Re: Create one file from another



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!
.



Relevant Pages

  • Tidy trimming empty tags
    ... I noticed that Tidy issues warnings whenever it encounters empty ... tags, and strips those tags if cleanup was requested. ... Tidy recommends "XMTML 1.0 Transitional" instead. ...
    (comp.infosystems.www.authoring.html)
  • Re: When printing a document on deskjet an empty page comes out
    ... suggestion perhaps never failed running under Windows, ... After having closed the empty preview I ... I’ve tried Print Selection, Print Active Sheets, Print All, Print 1 to 1, ...
    (microsoft.public.excel.misc)
  • Re: Remove Empty Tags on page
    ... I am dealing with a page spit out by .NET that leaves empty ... The .NET will leave behind any combination of nested tags. ... whose textContent or innerText is empty? ... var node, nodes = document.getElementsByTagName; ...
    (comp.lang.javascript)
  • Re: Dynamic creation of form elements
    ... I'll keep that in mind when posting followups to Google Groups users. ... omitted, but together with the content model "EMPTY", this is ... I can only say that optional end tags for elements with empty ... When was it ever considered valid by the W3C Markup Validator? ...
    (comp.infosystems.www.authoring.html)
  • Re: corrupt send msg box
    ... Click on the checkbox and hit Enter. ... >> empty checkbox. ... >> after doing all the other steps in the repair procedure. ... >> Unless, there is a specific suggestion, I'd like to reinstall Outlook ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)

Loading