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 the crontab?

750


What is echo $shell?

826


What does $$ mean in shell script?

810


What are zombie processes?

781


Is shell and terminal the same?

812


What is shell chemistry?

747


What is the syntax of while loop in shell scripting?

801


Is scripting and coding the same thing?

754


I have to write Shells (Linux + Unix)for publishing packages and reports. Is it possible ? What are the differents executable programs ineed to call ?

1894


How can we find the process name from its process id?

920


Determine the output of the following command: [ -z “” ] && echo 0 || echo 1

775


What is a beat in a script?

750


How to print all array elements and their respective indexes?

723


What is mac default shell?

822


I want to connect to a remote server and execute some commands, how can I achieve this?

803