Home > Archive > AWK > January 2005 > Re: Fixed length records containing 2 different records types with
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: Fixed length records containing 2 different records types with
|
|
| Ed Morton 2005-01-06, 3:57 pm |
|
Rookie Card wrote:
> William -
> The files don't have leading spaces but do have spaces in the middle
> Like this:
>
> 200409113 834736A90028
> CLIENTID 00VNI112B92658
> CLIE ID000VNI118S98271
> 200411 34129983A93065
>
> The spaces are never consistant as they represent a fixed lenth field
> and the data is not always the same legnth. Although the posistion of
> the records identifier ( A ) is always the same if you count the
> spaces. (Fixed length records with fixed field widths)
> I also tried awk '/A/' REC18.txt
> the output returned all records.
That's impossible given the input file you showed above.
Ed.
| |
| Kenny McCormack 2005-01-06, 3:57 pm |
| In article <crjpdc$it6@netnews.proxy.lucent.com>,
Ed Morton <morton@lsupcaemnt.com> wrote:
....
>
>That's impossible given the input file you showed above.
>
> Ed.
There is some kind of fundamental miscommunication going on in this thread.
For one, it is clear that the OP hasn't a clue about how AWK works.
He should acquire and read thoroughly some basic texts.
Second, I think there may be some kind of shell-quoting issue going on --
which is a nice way of saying, "I think he is using MS DOS w/o telling us
and we are, quite naturally, assuming Unix."
| |
| Ed Morton 2005-01-06, 8:56 pm |
|
Rookie Card wrote:
> William,
> That worked!
> I used the Kernighan version of awk for win32.
> awk "\"A\"==substr($0,18,1)" REC18.txt >RECA.txt
> The problem was gnu version 3.1.3 of gawk.exe
>
Given your other postings where you didn't use the above syntax, I doubt
if gawk was really the problem. Try it again using exactly the syntax above.
Ed.
| |
| Kenny McCormack 2005-01-11, 8:55 am |
| In article <crjpdc$it6@netnews.proxy.lucent.com>,
Ed Morton <morton@lsupcaemnt.com> wrote:
....
>
>That's impossible given the input file you showed above.
>
> Ed.
There is some kind of fundamental miscommunication going on in this thread.
For one, it is clear that the OP hasn't a clue about how AWK works.
He should acquire and read thoroughly some basic texts.
Second, I think there may be some kind of shell-quoting issue going on --
which is a nice way of saying, "I think he is using MS DOS w/o telling us
and we are, quite naturally, assuming Unix."
| |
| Ed Morton 2005-01-11, 8:55 am |
|
Rookie Card wrote:
> William,
> That worked!
> I used the Kernighan version of awk for win32.
> awk "\"A\"==substr($0,18,1)" REC18.txt >RECA.txt
> The problem was gnu version 3.1.3 of gawk.exe
>
Given your other postings where you didn't use the above syntax, I doubt
if gawk was really the problem. Try it again using exactly the syntax above.
Ed.
|
|
|
|
|