09-03-04 10:52 PM
In article <933293a5.0409030540.596094c1@posting.google.com>,
pokechoppe@aol.com (John) wrote:
> I'm very familiar with the tr command and use it a lot when removing
> certain characters from files, but my situation today is involving
> needing to remove a newline character from a certain area in the
> file.... not all newline characters in the entire file.
>
> If I had a 100 line file and wanted to state "ONLY Between lines 35
> and 42, remove the newline character", how would I do that? I'm
> thinking this would involve sed, but am unsure about the setup.
>
> Thanks.
In case someone hasn't mentioned this in the other group you posted in
(cross-posting is encouraged in the unix groups), why not write a perl
or awk script to read lines and keep a count. If the count is between
35 and 42, output the line without the trailing "\n" otherwise just
output the line.
just a SMOP (simple matter of programming)...
--
DeeDee, don't press that button! DeeDee! NO! Dee...
[ Post a follow-up to this message ]
|