I have a tab delimited text file that has 6 field per record. Unfortunately
the data aquistion program that created this file hiccupped in a few places
and every so often moved the first to the last position (left shifting the
whole record). If the first field has been moved I know it because now the
first field in the record is either 0 or -1.
So what I'ld like to do is write a quick and dirty script that rips down thru
the file (record by record), and if it finds a 0 or -1 in the first field it
yanks the last field back to the beginning where it belongs and right shifts
all of the other fields in the record. The resulting recodr is still tab
delimited of course.
I have been using sed, but perl or other languages are fine with me. If I have
to I can write a c++ prog, but I like the brievity of scripts using sed and
perl for doing various search and replace functions on text files.
Thanks for your help.
--
R. Haehnel
____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at
http://webmail.netscape.com.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs