Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] How to sort the data
- Date: Tue, 5 Dec 2006 22:30:55 -0800 (PST)
- From: Gerald Naughton <naughton123@example.com>
- Subject: Re: [tlug] How to sort the data
Hi > On 12/6/06, John Joseph <johnjoseph.e@example.com> > wrote: > > I am interested in sorting a data and write them > to different files. > > Example of data set is given below: > > A bit hard without the actual examples but you may > want to check out > the sort command. For example: > > sort unsorted.txt > sorted.txt > Sorry at the airport now so can`T test this (sort of pseudo code) - Get the list (first word in list ) cat file | awk '{print $1}' | sort -u > OUTFILE - Wire a script #!/usr/local/bin/tcsh foreach ff(`cat OUTFILE`) echo "Grepping $ff" grep ^$ff OUTFILE > ${ff}.out end If multiple words , use egrep ( egrep XX\|YY OUTFILE) some parts are syntax incorrect but u get the idea g ____________________________________________________________________________________ Need a quick answer? Get one in minutes from people who know. Ask your question on www.Answers.yahoo.com
- References:
- Re: [tlug] How to sort the data
- From: Keith Bawden
Home | Main Index | Thread Index
- Prev by Date: [tlug] searching archives?
- Next by Date: Re: [tlug] searching archives (nevermind that request)
- Previous by thread: Re: [tlug] How to sort the data
- Next by thread: [tlug] sorting data set -Help
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links