Skip to main content

All Questions

Tagged with
0 votes
1 answer
545 views

BASH - combine .md files from subdirectories into a master .md

We have a growing list of subdirectories and we would like to summarize the content in each with a .txt or .md file. We would then like to consolidate those readmes into a single master readme. We ...
nicksinthemiex's user avatar
2 votes
0 answers
116 views

How to source from stdout for both Linux and macOS?

On Linux I can do: source <(cat .env | grep ANDROID_GRADLE_TASK) But on macOS, this doesn't do anything (no error, and no source) What can I use for macOS? Is there a command that works both on ...
Dimitri Kopriwa's user avatar
0 votes
1 answer
705 views

"echo $VAR | base64 -di > file" fail to execute on MacOS

On Linux I can do: echo ${ANDROID_KEYSTORE} | base64 -di > android/keystores/staging.keystore But on MacOS, the same commands gives: base64: option requires an argument -- i Usage: base64 [-hvDd] ...
Dimitri Kopriwa's user avatar
0 votes
2 answers
21k views

How to use ls command to show all the files including hidden files, but not showing the files named '.' and '..'

The working directories contains several subdirectories, and each subdirectory contains some hidden files that start with .. How could I use the ls command to display all the files including the ...
lachimolala's user avatar
0 votes
1 answer
535 views

Two users (admin + non-admin) what is the right usage of su/sudo?

I have two users on a macos. U1 is a non-admin user and U2 is a admin user. I cannot add U1 to the sudoers. Is there a way to use U2 to act as if it was U1 issuing sudo <command>? My thinking: ...
geguze's user avatar
  • 101
1 vote
0 answers
1k views

Is the macOS/Linux shell the same thing as Bash?

sorry if this is a silly question, but are there any differences between Bash and the macOS/Linux shell? (not all Linux distros use the Bash shell right?)
Meester Moo's user avatar
3 votes
1 answer
1k views

Filter stdin of process executed with socat client

My question is: is there a way to pre-process the stdin of a command executed via socat client. Context: I am launching a reverse shell with socat using this command: $> socat -T30 "openssl-...
Antoine Trouve's user avatar
0 votes
0 answers
165 views

Including chmod in shell script - will it work for everyone?

I have a large wrapper.sh file which does a lot of things, but in the end runs catalina.sh tomcat. Problem is that users who run this wrapper.sh are experiencing error: no permissions to execute ...
Avaldor's user avatar
  • 101
0 votes
0 answers
312 views

Terminal opens with a command not found error

I checked the .bash_profile and .zprofile, but it is empty. Also .bashrc or .zshrc do not exist in my home directory. Terminal window
Shreyas Dangare's user avatar
0 votes
0 answers
100 views

Unable to redirect `coproc` streams using FD 5 and 6, but not 3 and 4. Why?

On OSX, while attempting to expose a service implemented as a bash script, and started with coproc, to a client implemented as a bash script, by passing the IO streams of the service to the client, I ...
Christopher King's user avatar
2 votes
1 answer
487 views

Sort files by date added not modified

I am trying to open the last application that was added to the /Applications directory on MacOS. For now, in order to find the latest app and open it, I run: open -a "$(ls -t1 /Applications/ | head -...
Sam's user avatar
  • 123
0 votes
1 answer
2k views

What does this rm -r command do in following usecase on mac terminal?

First I'm directing to the destination folder by below command cd /Users/myname/MyFolder/ Now I'm using below command here, what does this command will do? rm -r ../build ../dist rm command is for ...
Devender Kumar's user avatar
3 votes
1 answer
3k views

Is it dangerous to have /usr/local/bin ahead of /usr/bin in one's PATH?

I was reading a Stack Exchange answer here about a connected topic, and part of the accepted answer said this: never place user-writeable PATH elements ahead of those that can only be modified by ...
user3573051's user avatar
0 votes
1 answer
176 views

Moving files to matching folders on linux command line

I would like to copy or move files in to matching folders. these are my filenames: 1-filename-aa.txt 2-filename-aa.txt 3-filename-aa.txt 1-filename-bb.txt 2-filename-bb.txt 3-filename-bb.txt these ...
cnknv's user avatar
  • 1
0 votes
1 answer
209 views

Anaconda stopped working when added DYLD_LIBRARY_PATH to bashrc

I am using Anaconda Navigator version 1.9.7 on macOS Mojave 10.14.5. I found that most anaconda-navigator, pip, ... commands stopped working when I added the following command to .bashrc. export ...
Kernel's user avatar
  • 101

15 30 50 per page
1
2 3 4 5 6