Subscribe to Get Free Material Updates!
Visit my new blog WebData Scraping - Web Scraping Service provider company in India.

Write a script to display all words of a file in ascending order.


clear
echo "Ascending order of word in File"
echo " ==============================="
echo "Enter File Name "
read filename
echo "\n\n\t\t\t Main File "
echo "\t\t\t ========="
echo `cat $filename`
 for i in `cat $filename`
 do
 echo $i >> tempfile.txt
 done
 `sort tempfile.txt>$filename`
 echo "\n\n\t\t\tSorted Word in File "
 echo "\t\t\t ===================\n"
 echo `cat $filename`
 rm tempfile.txt

Output: 

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | coupon codes