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, m.r...@5-cent.us 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

[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

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 1st

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 groupname

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 long

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 write a

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, or ASCII,

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 夜神 岩男
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 夜神 岩男
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, and most of us don't

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 Japanese...),

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 plain text, not

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 *ASCI*.

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 plain text, not unicode,

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 ankushcen...@gmail.com 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.

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

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 want the