2d
awarded Caucus
Apr
11
awarded Yearling
Apr
11
comment bash function - why doesn't it work
In fact, yes. I've marked places to rewrite. Your advice is a good step further. To understand, who it works, you can read about Command substitution.
Apr
11
awarded Yearling
Apr
11
revised bash function - why doesn't it work
add strong quote explanation
Apr
11
answered bash function - why doesn't it work
Mar
5
comment Find and copy all images preserving the folder structure
ASFAIK, no. There is no such option. I'm sorry. I missed file in pipe of your command. There might be a workaround. I will check it later.
Mar
5
comment Find and copy all images preserving the folder structure
It will also work perfect with sudo command. Your initial version can have problems with it. Thanks to @joseph-larson for the note.
Mar
5
answered Find and copy all images preserving the folder structure
Mar
4
revised using IF to see a directory exists if not do something
added -n option
Mar
4
answered using IF to see a directory exists if not do something
Mar
3
revised PostgreSQL export result as CSV from remote server
more details
Mar
3
answered PostgreSQL export result as CSV from remote server
Feb
25
comment Executing a remote command over an SSH tunnel
Currently you do not log stderr. Could you please add please add 2>&1: sudo /home/pi/bin/relay1On.sh > /tmp/Bout.log 2>&1' I didn't notice that it was several days ago.
Feb
25
awarded Citizen Patrol
Feb
25
comment Linux: How can I get a different exit code from the find command if no files matching the pattern I used are found?
Duplicate of find command + enable Exit status to be diff then 0 when not match
Feb
25
comment Bash assign variable using another variable
The eval command is extremely powerful and extremely easy to abuse. Examples of bad use of eval
Feb
25
comment Bash assign variable using another variable
I was going to suggest eval or declare, but this solution works better.
Feb
25
comment substring extraction in bash
-eq is an integer comparison. It means equal to. It works only for numbers, so it is a simple way to check if something is a number. tldp. [ ! EXPR ] True if EXPR is false. Bash-Beginners-Guide
Feb
25
answered backgrounding a process with & (ampersand) does not work in bash
1 2 3 4 5