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 to find duplicate record in file using shell script?

1120


What is $1 in shell scripting?

832


What is shell company all about?

785


When should shell programming/scripting not be used?

852


What are the advantages of shell scripting?

854


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.

2504


What are different types of shell?

712


c program which behaves like a shell(command interpreter). it has its own prompt say "NewShell$".any normal shell command is executed from your shell by starting a child process to execute a system program corrosponding to the command

4997


c program the catches the ctrl-c(SIGINT) Signal for the first time and prints a output rather and exit on pressing Ctrl-C again

5994


What is scripting used for?

811


How do scripts work?

832


Can shell script run on windows?

801


What is batch file programming?

946


What is the use of "$#" in shell scripting?

788


madhar chod unix ke 10 commands dhang se likh nahi sakta hai

3235