All Questions
90
questions
0
votes
1
answer
551
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 ...
2
votes
0
answers
118
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 ...
0
votes
1
answer
712
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] ...
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 ...
0
votes
1
answer
545
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:
...
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?)
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-...
0
votes
0
answers
172
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 ...
0
votes
0
answers
313
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
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 ...
2
votes
1
answer
488
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 -...
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 ...
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 ...
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 ...
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 ...
3
votes
1
answer
20k
views
How does "echo $0" work?
I found out on Ask Ubuntu I can use this command to figure out what shell I am in.
echo $0
I like this because it is simple as compared to more complex solutions like this one on the Unix and Linux ...
1
vote
1
answer
1k
views
Can you run a Python program using Nice in Mac Terminal?
I'm trying to assign a high priority level to a Python program as soon as it runs using Terminal. I'm thinking of syntax along the lines of:
sudo nice -n -20 pythonfile.py
This returns the error: ...
1
vote
0
answers
270
views
Problems installing RCPLEX
I get an error while I try to install RCPLEX on my Computer and I can't figure out what to do. There is no information what so ever on the internet regarding my problem.
R Marcel$ R CMD INSTALL --...
0
votes
1
answer
530
views
Added an external folder to a project in PHPStorm on MacOS Mojave
I'm working in PHP Storm, on a project that's using a package I'm developing in tandem. I've had a couple of workflows for this, but I'd really like to add an external directory (the package source) ...
2
votes
3
answers
3k
views
Possible solutions for "-bash: ./bolt: cannot execute binary file"?
users,
I hope some of you have an idea on how I can fix the following issue.
What I am trying to do:
I am trying to install/use a software called BOLT-LMM from a *.tar.gz file downloaded here as ...
1
vote
3
answers
15k
views
How to display colour text in terminal?
I want to display colour text in terminal(bash shell). Tried with this approach:
echo -e "\e[1;31m This is red text \e[0m"
But it doesn't change the text colour to red.
1
vote
1
answer
356
views
Bash Script; process macOS disk number based on drive size... GREP
I'm looking to script a few CoreStorage commands on drives automatically. The problem is one of the drives is external, which means it can appear mounted on the system as anything from disk2 to disk4 ...
1
vote
2
answers
88
views
OSX - Find if phone is connected to the WIFI Network
I'm trying to programmatically find whether my phone is connected to the current Network, given that I know my device's mac Address.
Something like this SOMETIMES works:
arp -a | grep "11:11:11:11:...
1
vote
1
answer
199
views
Why can't I create a symlink to a directory at the same level as that directory?
I have a directory called Foo. I want a symlink to it, on the same level as it, called foo.
ln -s Foo foo creates a symlink in Foo pointing back to itself.
$ mkdir lntmp && cd lntmp
$ mkdir ...
0
votes
2
answers
1k
views
bash broken osx "[Process completed]"
I had an error in a script, which ran 'brew unlink bash'. I then started getting: Warning: bash already installed, it's just not linked
I tried
brew update && brew install bash
sudo bash -c ...
17
votes
3
answers
22k
views
How to force ls terminal command to show results in Bytes while I have set the default to ls -h in bash profile?
I am following the snippet here to improve my terminal command in Mac OSX.
It sets the default value of ls results to human-readable by exporting alias ls='ls -GFh' to bash profile file. This is very ...
1
vote
1
answer
6k
views
unix/linux chmod to let everyone read every directory and file
I'm having file permission trouble backing up my MacbookPro through my LAN to my Windows computer.
I want to set permissions of all files and directories on MacbookPro to allow reading by all. On the ...
1
vote
1
answer
226
views
Fortran Compiler Installation Instructions for OS X
I try install fortran compiler for Mac OSX El captain.
Firstly;
I install install_f2c_osx.csh
Run installation script
$ chmod +x install_f2c_osx.csh
$ sudo ./install_f2c_osx.csh
It gives this ...
-1
votes
1
answer
371
views
high priority for I/O operations
I came across this:
http://linux.die.net/man/1/ionice
however, it seems that it is not working on os x, as i got message that command not found.
is there any alternative to it or way to install ...
2
votes
1
answer
249
views
Working with different implementations of cp across different environments
So I figured GNU's cp is different than OSX's (BSD).
While OSX copies the contents of a directory that ends with a slash, or the directory itself without the slash, GNU/Linux just treats somedir and ...