411 B
411 B
Unix Shell
Manuals you'd need
Testing
If you want to test a string, value or a path, you can use [
E.g.
[ 1 = 1 ] will return 0, which means true
Getting Values from CLI
Usually, $# means number of arguments, while $1, $2 ... returns the argument.
Special cases:
$@returns all arguments$0returns the program itself
Pro tip: there are multiple ways to do this :)