Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a shell script that counts a number of unique word
contained in the file and print them in alphabetical order
line by line?

Answer Posted / manuswami

$ rm -f res res1 ; while read line ; do cat uniqtest | grep
-wc $line >>res1 ; echo "$line :-> Count=" >>res ;done <uni
qtest ; paste res res1 >final_temp ; cat final_temp|sort -u
>final ; rm -f res res1 final_temp1

Is This Answer Correct ?    1 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you find out What is your shell?

1025


How do I open a jshell in cmd?

1161


How to calculate the number of passed arguments?

1012


How to get the last line from a file using just the terminal?

1167


Is bash a shell script?

1010


State the advantages of shell scripting?

1017


How many fields are present in a crontab file and what does each field specify?

1070


What is the difference between break and continue commands?

1046


determine the output of the following command: echo ${new:-variable}

925


What is console line?

929


How will you pass and access arguments to a script in linux?

1083


Is powershell a bash?

1023


What does it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?

1013


Is shell scripting a language?

992


What is bash eval?

944