Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: OT: awk problem

Re: OT: awk problem

From: Maria Aurora VT de la Vega <mtdelavega_at_pse.org.ph>
Date: Wed, 15 May 2002 01:53:22 -0800
Message-ID: <F001.00460D28.20020515015322@fatcity.com>


thanks for the info.

right now, i cannot do anything about the terminal that inserts those characters. i am working with an extract file from a legacy system. i need to extract some lines from the file and load the data into the database.

btw, we cannot change the extract program so I have to do a workaround.

thanks.

Stephane Faroult wrote:

> Nothing to do with awk, probably just your terminal which inserts carriage returns. Shouldn't do that if you redirect to a file or set your terminal width to 132.
>
> >----- Original Message -----
> >From: Maria Aurora VT de la Vega
> ><mtdelavega_at_pse.org.ph>
> >To: Multiple recipients of list ORACLE-L
> ><ORACLE-L_at_fatcity.com>
> >Sent: Wed, 15 May 2002 00:23:22
> >
> >I'm hoping that there are awk gurus also in this
> >list.
> >
> >my problem:
> >when I use awk, it cuts off a part of the line
> >
> >$ cat -n *0509*|awk '{if ((substr($0,34,2) == "1I")
> >&& (length($0)) ==
> >107) {print $0}}'|sort
> > 1248 110 20020509909000010931381IF110 201
> >90900001PCOR AJ
> >S10000 10000 00001.7600MD
> > 1249 110 20020509909000020931511IF110 201
> >90900002PCOR AJ
> >S10000 10000 00001.7800MD
> > 1250 110 20020509909000030931591IF110 201
> >90900003PCOR AJ
> >S20000 20000 00001.8000MD
> > 1251 110 20020509909000040932551IF110 201
> >90900004PCOR AJ
> >B10000 10000 00001.6800MD
> > 1253 110 20020509909000050933021IF110 201
> >90900005PCOR AJ
> >B10000 10000 00001.6600MD
> > 1254 110 20020509909000060933091IF110 201
> >90900006PCOR AJ
> >B20000 20000 00001.6400MD
> > 1255 110 20020509909000070935361IF110 201
> >90900007MERB AJ
> >S1000 1000 00040.5000MD
> > 1256 110 20020509909000080935421IF110 201
> >90900008MERB AJ
> >S1000 1000 00041.0000MD
> > 1257 110 20020509909000090935491IF110 201
> >90900009MERB AJ
> >S1000 1000 00041.5000MD
> > 1258 110 20020509909000100936101IF110 201
> >90900010MBT AJ
> >S1000 1000 00041.5000MD
> > 1259 110 20020509909000110938211IF110 201
> >90900011FPH AJ
> >S1000 1000 00027.5000MD
> > 1260 110 20020509909000120938291IF110 201
> >90900012FPH AJ
> >S1000 1000 00028.0000MD
> > 1261 110 20020509909000130938561IF110 201
> >90900013PCOR AJ
> >S10000 10000 00001.7400MD
> > 1262 110 20020509909000140939271IF110 201
> >90900014MERB AJ
> >S1000 1000 00040.5000MD
> >
> >i am supposed to get a longer line
> >getting line 1248 as an example:
> >
> >$ grep "110 20020509909000010931381IF110 201
> >90900001PCOR" *0509*
> >110 20020509909000010931381IF110 201 90900001PCOR
> > AJ
> >S10000 10000 00001.7600MD C0905L
> >
> >^^^^^^
> >
> >LOST PART
> >
> >if I look at the file in windows notepad, this same
> >line has 4box
> >characters between 00001.7600MD and C0905L
> >I am not sure what those 4 box characters are.
> >
> >help.
> >
> >Thanks.
> >
> >=)
> >--
> >Maria Aurora VT de la Vega OCP
> >Database Specialist
> >Philippine Stock Exchange, Inc.
> >
>
> Regards,
>
> Stephane Faroult
> Oriole

--
"Never attribute to malice that which can be adequately explained by stupidity."

Maria Aurora VT de la Vega OCP
Database Specialist
Philippine Stock Exchange, Inc.


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Maria Aurora VT de la Vega
  INET: mtdelavega_at_pse.org.ph

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed May 15 2002 - 04:53:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US