Re: [CentOS] awk help

2010-12-01 Thread Stephen Harris
On Thu, Dec 02, 2010 at 08:19:51AM +0800, Christopher Chan wrote: > It does not. I don't know why the OP is even trying to do it this way. My guess: school work. -- rgds Stephen ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailma

Re: [CentOS] awk help

2010-12-01 Thread Christopher Chan
On Thursday, December 02, 2010 07:57 AM, Les Mikesell wrote: > On 12/1/2010 5:44 PM, Ross Walker wrote: >> On Dec 1, 2010, at 5:07 PM, Christopher >> Chan wrote: >> >>> On Thursday, December 02, 2010 05:09 AM, ann kok wrote: Hi all Anyone can help to let me know how to l

Re: [CentOS] awk help

2010-12-01 Thread Les Mikesell
On 12/1/2010 5:44 PM, Ross Walker wrote: > On Dec 1, 2010, at 5:07 PM, Christopher > Chan wrote: > >> On Thursday, December 02, 2010 05:09 AM, ann kok wrote: >>> Hi all >>> >>> Anyone can help to let me know how to >>> >>> ls -1 | lsattr >> >> lsattr `ls -1` >> >>> >>> >>> ls -al /folder | awk '{

Re: [CentOS] awk help

2010-12-01 Thread Ross Walker
On Dec 1, 2010, at 5:07 PM, Christopher Chan wrote: > On Thursday, December 02, 2010 05:09 AM, ann kok wrote: >> Hi all >> >> Anyone can help to let me know how to >> >> ls -1 | lsattr > > lsattr `ls -1` > >> >> >> ls -al /folder | awk '{ print $2}' | lsattr >> > > > for i in `ls -al /f

Re: [CentOS] awk help

2010-12-01 Thread Christopher Chan
On Thursday, December 02, 2010 05:09 AM, ann kok wrote: > Hi all > > Anyone can help to let me know how to > > ls -1 | lsattr lsattr `ls -1` > > > ls -al /folder | awk '{ print $2}' | lsattr > for i in `ls -al /folder | awk '{ print $8}'`; do lsattr /folder/$i; done

RE: [CentOS] Awk help

2008-06-23 Thread Joseph L. Casale
>you can simplify that line down to: > >awk 'BEGIN { FS=":" } /(smtp|SMTP)/ { printf "%-30sOK\n", $NF }' $1 > >the -30 will make sure that everything aligns, because with just a tab >to separate the email addresses, you'll end up with a wonky OK column. >-30 pads out the first column to 30 characte

Re: [CentOS] Awk help

2008-06-23 Thread Spiro Harvey, Knossos Networks Ltd
I have csvde dump from active directory I process on my postfix mta. It takes output like this: "CN=Curtis xxx,OU=Domain Users,OU=xxx xxx,DC=xxx-xxx,DC=local",X400:c=US\;a= \;p=xxx xxx xxx\;o=Exchange\;s=xxx\;g=xxx\;;SMTP:[EMAIL PROTECTED] and should return a relay_recipient map in the form of: [

RE: [CentOS] Awk help

2008-06-23 Thread Joseph L. Casale
>It works OK on the test line you provided; my guess is your datafile >has other lines that match "SMTP" in other fields of the source. Yeah when I echo'ed a single email into it everything was fine, but the file wasn't. I looked at it in vi and saw all the dos carriage returns so added a tr -d '

Re: [CentOS] Awk help

2008-06-23 Thread Stephen Harris
On Mon, Jun 23, 2008 at 11:25:45AM -0600, Joseph L. Casale wrote: > I have csvde dump from active directory I process on my postfix mta. > It takes output like this: > > "CN=Curtis xxx,OU=Domain Users,OU=xxx xxx,DC=xxx-xxx,DC=local",X400:c=US\;a= > \;p=xxx xxx xxx\;o=Exchange\;s=xxx\;g=xxx\;;SMTP