First example: Output of files






[example file]


echo -n "text"

outputs text without a newline at the end

read [variable]

reads in input from keyboard and
stores it under the name variable
The value of variable is retrieved with $variable.

for [loopvar] in [range]

loop: loopvaraible loopvar takes on any value in range.
In this case file with the specific ending are visited.

do;[loop commands];done

The commands within the loop are framed by do-done.

if [condition] then [commands] fi

if the condition is true (yield a 0), the commands are executed.
Extensions include else or constructions with elif [condition] then.

test [things]

tests wether things are true or not and returns 0 or 1.
test -{r,w,x} [file] tests wether the file is readable, writable or executable.
test -{z,n} [string] tests wether the string has length 0 or not 0.
test a -eq b tests wether a = b, etc.




[prev]   [top]   [next]