Pages

Tuesday, March 19, 2013

Write a script to delete duplicate lines from a file?


$vi duplicate.sh
echo “enter a filename to delete “
read fname
sort $fname | unique -u >temp
mv temp $fname
echo “file with unique lines”
cat $fname
:wq

No comments:

Post a Comment