Re: [CentOS] Need help in writing a shell/bash script

2012-01-07 Thread ankush grover
Thanks supergiantpotato and Edo. Scripts worked for me. Thanks a lot :) On Sat, Dec 31, 2011 at 12:45 AM, wrote: > John R Pierce wrote: >> On 12/30/11 9:58 AM, Les Mikesell wrote: >>> Here's a perl approach: >> >> which, unlike all the other versions, doesn't require the data be >> pre-sorted,

Re: [CentOS] Need help in writing a shell/bash script

2011-12-30 Thread m . roth
John R Pierce wrote: > On 12/30/11 9:58 AM, Les Mikesell wrote: >> Here's a perl approach: > > which, unlike all the other versions, doesn't require the data be > pre-sorted, by virtue of adding all the tuples to a hash. I don't even > think that sort in the output loop is required, unless you wa

Re: [CentOS] Need help in writing a shell/bash script

2011-12-30 Thread John R Pierce
On 12/30/11 9:58 AM, Les Mikesell wrote: > Here's a perl approach: which, unlike all the other versions, doesn't require the data be pre-sorted, by virtue of adding all the tuples to a hash. I don't even think that sort in the output loop is required, unless you want the groups output in alph

Re: [CentOS] Need help in writing a shell/bash script

2011-12-30 Thread Les Mikesell
On Fri, Dec 30, 2011 at 6:00 AM, ankush grover wrote: > Hi Friends, > > I am trying to write a shell script which can merge the 2 columns into > 3rd one on Centos 5. The file is very long around 31200 rows having > around 1370 unique groups and around 12000 unique user-names. > The 1st column is t

Re: [CentOS] Need help in writing a shell/bash script

2011-12-30 Thread m . roth
夜神 岩男 wrote: > On 12/31/2011 01:56 AM, Craig White wrote: >> On Dec 30, 2011, at 9:52 AM, m.r...@5-cent.us wrote: >>> Craig White wrote: looked like English to me... On Dec 30, 2011, at 9:41 AM, m.r...@5-cent.us wrote: > Hey, supergiantpotato (and btw, this list is plai

Re: [CentOS] Need help in writing a shell/bash script

2011-12-30 Thread Marc Deop
On Friday 30 December 2011 11:41:47 m.r...@5-cent.us wrote: > Hey, supergiantpotato (and btw, this list is plain text, not unicode, and > most of us don't read Japanese...), You are not using "plain text" and "unicode" correctly here. I've read pleasantly his emails in *plain text* encoded in *AS

Re: [CentOS] Need help in writing a shell/bash script

2011-12-30 Thread Craig White
On Dec 30, 2011, at 10:19 AM, Scott Robbins wrote: > On Fri, Dec 30, 2011 at 11:52:21AM -0500, m.r...@5-cent.us wrote: >> Craig White wrote: > > >>> looked like English to me... >>> >>> On Dec 30, 2011, at 9:41 AM, m.r...@5-cent.us wrote: >>> Hey, supergiantpotato (and btw, this list is

Re: [CentOS] Need help in writing a shell/bash script

2011-12-30 Thread Scott Robbins
On Fri, Dec 30, 2011 at 11:52:21AM -0500, m.r...@5-cent.us wrote: > Craig White wrote: > > looked like English to me... > > > > On Dec 30, 2011, at 9:41 AM, m.r...@5-cent.us wrote: > > > >> Hey, supergiantpotato (and btw, this list is plain text, not unicode, > >> and most of us don't read Japane

Re: [CentOS] Need help in writing a shell/bash script

2011-12-30 Thread 夜神 岩男
On 12/31/2011 01:56 AM, Craig White wrote: > > On Dec 30, 2011, at 9:52 AM, m.r...@5-cent.us wrote: > >> Craig White wrote: >>> looked like English to me... >>> >>> On Dec 30, 2011, at 9:41 AM, m.r...@5-cent.us wrote: >>> Hey, supergiantpotato (and btw, this list is plain text, not unicode, >>

Re: [CentOS] Need help in writing a shell/bash script

2011-12-30 Thread 夜神 岩男
On 12/31/2011 01:41 AM, m.r...@5-cent.us wrote: > Hey, supergiantpotato (and btw, this list is plain text, not unicode, and > most of us don't read Japanese...), Thanks for the info > This is really complicated and fiddly. Look at the one awk script that was > posted, which is *far* simpler, and

Re: [CentOS] Need help in writing a shell/bash script

2011-12-30 Thread Craig White
On Dec 30, 2011, at 9:52 AM, m.r...@5-cent.us wrote: > Craig White wrote: >> looked like English to me... >> >> On Dec 30, 2011, at 9:41 AM, m.r...@5-cent.us wrote: >> >>> Hey, supergiantpotato (and btw, this list is plain text, not unicode, >>> and most of us don't read Japanese...), >>> >>>

Re: [CentOS] Need help in writing a shell/bash script

2011-12-30 Thread m . roth
Craig White wrote: > looked like English to me... > > On Dec 30, 2011, at 9:41 AM, m.r...@5-cent.us wrote: > >> Hey, supergiantpotato (and btw, this list is plain text, not unicode, >> and most of us don't read Japanese...), >> >> 夜神 岩男 wrote: ^^ doesn't look like English,

Re: [CentOS] Need help in writing a shell/bash script

2011-12-30 Thread Craig White
looked like English to me... On Dec 30, 2011, at 9:41 AM, m.r...@5-cent.us wrote: > Hey, supergiantpotato (and btw, this list is plain text, not unicode, and > most of us don't read Japanese...), > > 夜神 岩男 wrote: >> On 12/30/2011 09:00 PM, ankush grover wrote: >>> >>> I am trying to w

Re: [CentOS] Need help in writing a shell/bash script

2011-12-30 Thread m . roth
Hey, supergiantpotato (and btw, this list is plain text, not unicode, and most of us don't read Japanese...), 夜神 岩男 wrote: > On 12/30/2011 09:00 PM, ankush grover wrote: >> >> I am trying to write a shell script which can merge the 2 columns into >> 3rd one on Centos 5. The file is very

Re: [CentOS] Need help in writing a shell/bash script

2011-12-30 Thread 夜神 岩男
On 12/30/2011 09:00 PM, ankush grover wrote: > Hi Friends, > > I am trying to write a shell script which can merge the 2 columns into > 3rd one on Centos 5. The file is very long around 31200 rows having > around 1370 unique groups and around 12000 unique user-names. > The 1st column is the groupna

Re: [CentOS] Need help in writing a shell/bash script

2011-12-30 Thread Edo
Hi, On Friday, December 30, 2011 at 9:00 PM, ankush grover wrote: > Hi Friends, > > I am trying to write a shell script which can merge the 2 columns into > 3rd one on Centos 5. The file is very long around 31200 rows having > around 1370 unique groups and around 12000 unique user-names. > The

[CentOS] Need help in writing a shell/bash script

2011-12-30 Thread ankush grover
Hi Friends, I am trying to write a shell script which can merge the 2 columns into 3rd one on Centos 5. The file is very long around 31200 rows having around 1370 unique groups and around 12000 unique user-names. The 1st column is the groupname and then 2nd column is the user-name. 1st Column (Gr