Re: [CentOS] Formatting print with awk and ORS

2009-07-07 Thread John Doe
From: Joseph L. Casale jcas...@activenetwerx.com I have a command I execute: awk 'BEGIN { ORS= } { print \ $1 \ }' input_file which gives me exactly what I need, all field one's in quotes on one line each separated by one space. I now need to print a single quote around all of this, but the

Re: [CentOS] Formatting print with awk and ORS

2009-07-07 Thread Joseph L. Casale
awk -v q=' ' BEGIN { ORS= ; printf(%s, q) } { print \ $1 \ } END { printf(%s, q) } ' or awk ' BEGIN { ORS= ; printf(\x27) } { print \ $1 \ } END { printf(\x27) } ' Thanks JD! ___ CentOS mailing list CentOS@centos.org

[CentOS] Formatting print with awk and ORS

2009-07-06 Thread Joseph L. Casale
I have a command I execute: awk 'BEGIN { ORS= } { print \ $1 \ }' input_file which gives me exactly what I need, all field one's in quotes on one line each separated by one space. I now need to print a single quote around all of this, but the ORS flag is screwing me up, it's causing every