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: Help for Unix text file processing

Re: Help for Unix text file processing

From: Jared Still <jkstill_at_cybcon.com>
Date: Thu, 07 Jun 2001 11:56:29 -0700
Message-ID: <F001.00320AB3.20010607103747@fatcity.com>

On Thursday 07 June 2001 04:10, ALEMU Abiy wrote:
> But if I want to conserve the carriage return
>

Then change the script from '\n' to '\r\n'

Jared

> -----Message d'origine-----
> De : Jared Still [mailto:jkstill_at_cybcon.com]
> Envoyé : jeudi 7 juin 2001 12:36
> À : Multiple recipients of list ORACLE-L
> Objet : Re: Help for Unix text file processing
>
>
>
> Do it with Perl. If you don't know it, it's
> time to learn.
>
> This script will do it:
>
> #!/usr/bin/perl -pw
>
> chomp;
> next if /^\s+$/;
> $_ =~ s/^\s+(.*)$/$1\n/;
>
>
> run as my_script file_to_fix.txt > fixed_file.txt
>
> Jared
>
> On Wednesday 06 June 2001 07:55, you wrote:
> > > Hey all,
> > >
> > > I am looking for some commands like ( grep, egrep, sed etc) to do the
> > > following on a Unix box.
> > >
> > > 1. Command to take out all the blank line from a text file. The blank
> > > line may include tabs and whitespaces.
> > > 2. Command to take out the trailing and starting blanks and tabs from
>
> the
>
> > > each line of the text file.
> > > 3. Command for the above two tasks combined.
> > >
> > > Thanks in advance.
> > >
> > > Dharminder Kumar
> >
> > This e-mail and any attachments may contain confidential and privileged
> > information. If you are not the intended recipient, please notify the
> > sender immediately by return e-mail, delete this e-mail and destroy any
> > copies. Any dissemination or use of this information by a person other
>
> than
>
> > the intended recipient is unauthorized and may be illegal. Unless
>
> otherwise
>
> > stated, opinions expressed in this e-mail are those of the author and are
> > not endorsed by the author's employer.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jared Still
  INET: jkstill_at_cybcon.com

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 Thu Jun 07 2001 - 13:56:29 CDT

Original text of this message

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