Search Results

Search: Posts Made By: TRB
1,928
Posted By TRB
How about this: echo "xx yy zz" | awk...
How about this:


echo "xx yy zz" | awk 'BEGIN{FS=" "}{ for (i=1; i<=(NF-1); i++) { printf("%s,", $i); } printf("%s\n", $NF); }'
Forum: AIX 09-16-2010
5,813
Posted By TRB
This snippet handles both a quoted 4th field and...
This snippet handles both a quoted 4th field and an unquoted 4th field
as long as the 4th field is always two characters long:


awk -F',' \
' { if ( substr($7,2,2) == "01" || $4 == "01"...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 09:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy