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

What is web script?

588


How do I run a powershell script?

582


What is option in shell script?

565


When should shell programming/scripting not be used?

598


How would you compare the strings in a shell script?

550






What does $0 mean in shell script?

563


what is tickets $ what low,medium,high priorite pls define time also

1726


how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com

2115


What is ms powershell?

591


How to debug the problems encountered in the shell script/program?

632


write a shell script to emulate the Id command of PRIMOS which lists files and directories. It list files first with a header FILES and then directories with a header DIRECTORIES. This command has several options. The main ones are. -file select files only -dir select directories only -reverse sort in reverse order -no_header put no header on the output -brief output the header only -size display the size of each file -help display Id´s syntax and options.

2234


How can the contents of a file inside jar be read without extracting in a shell script?

600


What is the use of break command?

592


Print the 10th line without using tail and head command.

1680


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

598