0% found this document useful (0 votes)
18 views1 page

U 6

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

U 6

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

--write a script accept a filename and delete all duplicate lines

echo -n "enter a filename to delete duplicate lines:"


read fn
sort $fn | uniq -u >temp
mv temp $fn
echo "$fn file duplicate lines are deleted."
esc
:wq chand1
enter
$ sh chand1
--o/p
enter a filename to delete duplicate lines:k
k file duplicate lines are deleted.
filename k
as
sd
asd
as
as
abc
now file k becomes
abc
asd
sd

You might also like