Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Command Line Tools for Mac File System
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Note: When work both in Linux and macOS, a painful burden to use command-line is to remember subtle differences between Linux commands and macOS commands. A a matter of fact, GNU …
Programming in Shell
String¶
Regular Expression Comparison¶
https://stackoverflow.com/questions/229551/how-to-check-if-a-string-contains-a-substring-in-bash
Bash Programming¶
- case ... esac is different from switch(){} in C/C++. You do not have to return/exit manually after each branch.
not condition
if [ ! -d "$1" ]; then
fi
Shell Programing Trick¶
Generate 00, 01, ..., to 25.
for i in {00..25}; do echo $i; done
or
seq -f %02g 0 25
Shell Scripting¶
Run Commands on Remote Machines
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
On a Sinsgle Machine
SSH
-
The pipeline command is run locally. If you want the pipeline command to run remotely, place the whole command to be run remotely in double/single …
Tips on the Shell command ps
Show full comand of processes.