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
How to find duplicate record in file using shell script?
What is $1 in shell scripting?
What is shell company all about?
When should shell programming/scripting not be used?
What are the advantages of shell scripting?
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.
What are different types of shell?
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
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
What is scripting used for?
How do scripts work?
Can shell script run on windows?
What is batch file programming?
What is the use of "$#" in shell scripting?
madhar chod unix ke 10 commands dhang se likh nahi sakta hai