2)
set -f Takes away filename expansions
set +f Envoke filename expansions
set -x Displays all expressions possible
Assignment 4
1)
# coolct.ksh
clear
echo
echo "type end to quit"
if (($word==$end))
then break
else
echo
echo "Enter file name for word count"
echo
read file
echo Word count is, $(wc <$file)"
fi
done
2)
# last.ksh
echo Number of arguments given is $#
echo
echo "Last argument is, $# -l $"
done
3)
# gp.ksh
echo
echo "Enter parameter"
read $re
cat $re |more
done
Project
#project.ksh
#N=filename; W= word or $ in a file; L=list files
echo
echo "N, W, or L?"
read input
if (($input==N))
then
echo "Input file name"
read file
ls -l file
fi
if (($input==W))
then
echo "Input word to find))
read $word
cat $word
fi
if(($input==L))
then
ls -l
fi
else
echo "Illegal option"
done