User Tools

Site Tools


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:

  1. e
  2. d
  3. f

Check file permissions:

  1. r
  2. w
  3. x

Check file type:

  1. b
  2. c
  3. L
  4. S
shellscript.1737257060.txt.gz · Last modified: 2025/01/19 03:24 by 1211112228

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki