Help me...


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help me...
# 1  
Old 10-25-2008
Help me...

How to Write a shell script that counts a number of unique word contained in the file and print them in alphabetical order line by line.
Please help me.
Waiting for positive result.
# 2  
Old 10-25-2008
Hammer & Screwdriver The basic approach would be

(simply folloinwg the logic)

cat myfile | sort | uniq -c

There are variations to this, and simplifications, but without seeing your input/output requirements, it is hard to provide more.
# 3  
Old 10-25-2008
could u tell me in detail coz i am new for Linux
# 4  
Old 10-25-2008
Question DO you have a sample input file?

If you provided a sample input file, it could be shown how to accomplish this. Also, is there a requirement for output?
# 5  
Old 10-25-2008
no nothing... actually this was asked by my teacher..
# 6  
Old 10-25-2008
Quote:
could u tell me in detail coz i am new for Linux
Read again and comply to the rules:
(6) Do not post classroom or homework problems.
(9) Edit your posts if you see spelling or grammar errors (don't write in cyberchat or cyberpunk style). English only.

2 cases are offered to you:
Either you are a true newbie therefore your post should be in Q/A for dummies... where you would be helped in understanding what are commands, what they do...
Either you have some command knowledge and are fighting in putting them in good sequence in order to produce the expected result, in which case where is the faulty script?
Have you tried the above suggestion?
What's wrong with it?
# 7  
Old 10-25-2008
Rules violation; thread closed

Please review forum rules.
(6) Do not post classroom or homework problems.
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question