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 I run a script from command prompt?

560


Given a file find the count of lines containing the word "abc".

950


What language is bash written in?

557


Can shell script run on windows?

562


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.

2226






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

542


Is shell scripting useful?

592


What is the difference between break and continue commands?

570


what is info area how many types?

2287


Explain about gui scripting?

622


What lives in a shell?

537


Write a script to print the first 10 elements of fibonacci series.

1758


How to check if a directory exists?

553


What is the use of "$?" Sign in shell script?

613


Where are cowrie shells found?

574