Friday, 27 February 2015

Sample SHELL program to illustrate file read and file write operations

if [ $# -lt 2 ]
then
  echo "Please provide 2 file names";
  exit
fi

while read LINE
do
  echo $LINE >> $2
done < $1

No comments:

Post a Comment