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 / neennii

sort -u wordtestfile.txt | tee outuniquefile.txt | echo "total unique words are" `wc -w` ; cat outuniquefile.txt

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1686


What is $1 in shell scripting?

593


Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.

2176


What does $@ mean bash?

670


How do I run a shell script in powershell?

555






What is sh in shell script?

577


How does shell scripting work?

620


how will you find the total disk space used by a specific user?

584


Explain about stdin, stdout and stderr?

637


Explain how you Automate your application using Shell scripting.

1852


What can scripts do?

666


What is sudo command?

554


What lives in a shell?

542


What is web script?

586


What is batch file programming?

696