Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > Re: Line trunca...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 2139 of 2236
Post > Topic >>

Re: Line truncation.

by William James <w_a_x_man@[EMAIL PROTECTED] > Jan 24, 2008 at 02:08 AM

On Jan 23, 12:58 pm, "Rob Bradford" <rob.polym...@[EMAIL PROTECTED]
>
wrote:
> Hi.
>
> I have a issue with a file from an old legacy (HP3000) system. When the
file
> is transfered by FTP onto a Unix server the 3000's FTP process pads the
> lines to a fixed length.  This seems to be a function of the 3000's FTP
> implementation. ie: It picks up a fo;e of say 1674012 bytes and sends
> 1709094 bytes for example!
>
> Anyway to cut a long story short, how do I chop each and every line back
to
> the last no white_space character?  Each of the extended lines has a LF
that
> I need to keep, or replace it in the new end-of line opsition.  I know
AWK
> should be the solution but where do I start?
>
> Any pointers would be appreciated.
>
> Rob.B
>
> --
> (\__/)   This is Bunny.
> (='.'=)  Help him and his friends by supporting the
> (")_(")  Rabbit Welfare Association:www.houserabbit.co.uk

mawk 'BEGIN{RS=" *\n"}8' the_file

awk 'BEGIN{FS=" +$"}{print $1}'




 4 Posts in Topic:
Line truncation.
"Rob Bradford"   2008-01-23 18:58:03 
Re: Line truncation.
Kees Nuyt <k.nuyt@[EMA  2008-01-23 21:22:19 
Re: Line truncation.
Ed Morton <morton@[EMA  2008-01-23 15:21:08 
Re: Line truncation.
William James <w_a_x_m  2008-01-24 02:08:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 2:25:15 CDT 2008.