Search Results

Search: Posts Made By: Don Cragun
11,463
Posted By Don Cragun
This is not some undocumented trick. From the...
This is not some undocumented trick. From the standards:

Part of that re-evaluation includes using OFS as the field delimiter when that record is printed.

This might not work in /usr/bin/awk...
11,463
Posted By Don Cragun
I know that awk (not AWk and not AWK) work OK on...
I know that awk (not AWk and not AWK) work OK on AIX. Something else is going on here.

I assume that you have the three commands I suggested in a file that you executed to get the results you...
11,463
Posted By Don Cragun
If none of the above suggestions work and you...
If none of the above suggestions work and you have exactly copied the commands suggested, try changing:awk -F'|' ...
to:awk -F'[|]' ...
and see if that makes any difference with the awk on AIX...
11,463
Posted By Don Cragun
1st: This is a UNIX and Linux forum. Unless...
1st: This is a UNIX and Linux forum. Unless explicitly told otherwise, we do not expect input files using DOS <carriagereturn><newline> line terminators; we expect UNIX and Linux <newline> line...
11,463
Posted By Don Cragun
What OS are you using? I repeat: Why are you...
What OS are you using?

I repeat: Why are you using >> A5.txt instead of > A5.txt???

Please put the data you showed us in the JPEG file you posted in a file named A4.txt and run the command:...
11,463
Posted By Don Cragun
etldev, There has to be a space between the '...
etldev,
There has to be a space between the ' terminating the awk script and the filename being given to awk as an input file:
awk -F'|' -v OFS='","' 'NF{$1 = $1; $0 = "\"" $0 "\""}1' A4.txt >>...
11,463
Posted By Don Cragun
You also have forgotten to tell us what OS you're...
You also have forgotten to tell us what OS you're using. The awk script I suggested will properly handle any number of fields on a line as long as the length of longest line in the output file is no...
11,463
Posted By Don Cragun
But, of course, the above script only works...
But, of course, the above script only works correctly if the input fed into it always has exactly four fields in the input (and I didn't see anything in this thread so far that places any limits on...
Showing results 1 to 8 of 8

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