UNIX Shell Script
出自KMU Wiki
目錄 |
Bourne shell(sh)
Variable
YOURVAR=some<br>echo $YOURVAR<br>echo ${YOURVAR}<br>
Flow control
if [ -f your_file ]; then echo "your_file exists
for f in a b c
do
echo $f
done
Sub Program
sub()
{
echo $1 $2 $3
}
sub X Y Z
Examples
#!/bin/sh
exec <$1
while read line
do
echo $line
done
