init
This commit is contained in:
23
hints/Shell.md
Normal file
23
hints/Shell.md
Normal file
@ -0,0 +1,23 @@
|
||||
# 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:
|
||||
|
||||
1. `$@` returns all arguments
|
||||
2. `$0` returns the program itself
|
||||
|
||||
> Pro tip: there are multiple ways to do this :)
|
||||
|
||||
Reference in New Issue
Block a user