Re: Create one file from another
- From: gilbertost73@xxxxxxxxxxxx
- Date: Sun, 12 Oct 2008 21:54:38 -0700 (PDT)
On Oct 12, 5:42 am, stan <smo...@xxxxxxxx> wrote:
Ed Morton wrote:
<snip>
Yes my input file looks like that , ie, without separator characters.
All fields has fixed length
It must've been difficult finding customers who all had names that are the same
length.
They probably make name tags :)
** Posted fromhttp://www.teranews.com**
Hi Janis,
I appreciate your help.
Following your suggestion i'm getting a blank field into my output
file.
My input file is:
5188824071shell 14/07/2008
12:48:44 51.50ABNN 94932030
My id.map file is
5188824071 1215559042
The command used:
awk 'BEGIN { OFS=";" }
NR==FNR { map[$1] = $2 ; next }
NR>1 { print "APPL", substr($0,84,15),
substr($0,48,10),"map[substr($0,11,10)]",substr($0,67,13),"USD",substr($0,84,15),"TEST" }'
id.map my_input_file > output
I got the output like:(but the value that i need is empty after the
date 14/07/2008 as you can see ";;")
APPL; 94932030;14/07/2008;; 51.50;USD;
94932030;TEST
When i tried the comand
FNR>1 { print "APPL", substr($0,84,15),
substr($0,48,10),"map[substr($0,11,10)]",substr($0,67,13),"USD",substr($0,84,15),"TEST" }'
id.map my_input_file > output
Nothing is coming in my output file.
Do you know what i'm doing wrong?
Thanks!
.
- Follow-Ups:
- Re: Create one file from another
- From: Janis Papanagnou
- Re: Create one file from another
- References:
- Create one file from another
- From: gilbertost73
- Re: Create one file from another
- From: pk
- Re: Create one file from another
- From: gilbertost73
- Re: Create one file from another
- From: Ed Morton
- Re: Create one file from another
- From: stan
- Create one file from another
- Prev by Date: Re: mv files and subdirectories recursively
- Next by Date: Re: Create one file from another
- Previous by thread: Re: Create one file from another
- Next by thread: Re: Create one file from another
- Index(es):
Relevant Pages
|
Loading