Hi Jared,
You are a kinder DBA than I.
It's good to see that constulting attitude developing :)
Dave
Jared wrote .
> But if I want to conserve the carriage return
>
Then change the script from '\n' to '\r\n'
Jared
--
Dave Morgan
DBA, Cybersurf
Office: 403 777 2000 ext 2
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
But if I want to conserve the carriage return
-Message d'origine-
De : Jared Still [mailto:[EMAIL PROTECTED]]
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
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 f
Here are some sed commands that do what you want -- in the [] brackets,
there is a space and a tab.
$ cat removeblanks.sed
/^[ ]*$/d
s/^[]*//
s/[ ]*$//
Here's a test file.
$ cat test.txt
This is a real line, the lines above are a carriage return, a tab and
spaces.
Look into using sed. It was made for that kind of thing.
-Original Message-
Sent: Wednesday, June 06, 2001 9:56 AM
To: Multiple recipients of list ORACLE-L
> Hey all,
>
> I am looking for some commands like ( grep, egrep, sed etc) to do the
> following on a Unix box.
>
> 1. Command t