Create a bash shell script to sort and then
uniq the file from the command line & store it to a new
file and output the results to the screen. Name this
script "sortAndUniq.sh"

Answer Posted / vipul dalwala

sort $1 | uniq | tee output.txt

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does $$ mean in shell script?

587


How do scripts work?

610


What is subshell?

530


How do I run a .sh file?

615


Please give me example of " at command , contrab command " how to use

2325






What is sh in shell script?

575


How to debug the problems encountered in the shell script/program?

629


Calculate a real number calculation directly from the terminal and not any shell script.

658


Why is shell scripting important?

576


What lives in a shell?

539


How do I run a shell script in powershell?

554


What is scripting used for?

562


What is echo $shell?

625


how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?

3605


What does the sh command do?

607