shellscript
This is an old revision of the document!
Shell Scripting
Execute shell script:
./script.sh bash script.sh source script.sh
Read user input:
read
Echo text to screen:
echo
Arithmetic operations:
let expr
Conditional statements:
if case
Loops:
for while
Array operations:
declare read -a
Check file/directory existence:
[file] -e [file] -d [file] -f
Check file permissions:
- r
- w
- x
Check file type:
- b
- c
- L
- S
shellscript.1737257110.txt.gz · Last modified: 2025/01/19 03:25 by 1211112228
