02-11-04 11:34 PM
In <comp.unix.admin> John <pokechoppe@aol.com> wrote:
> I'm still having problems with this subject matter. If I have a line
> that is 600 characters long and I need to replace whatever is in
> characters (fields) 360 - 364 with the five digit code ABCDE, how do I
> do this?
>
> I've tried utilizing sed for this, but I get endpoint too large errors
> because I can't run a sed substitute command past 255 characters.
> Below is what I've tried to do, but I keep receiving endpoint too
> large errors when I put 360 in the command:
>
> sed "/^A00.*${INVNUM}.*${PRODNUM}/s/\([a-zA-Z0-9 ]\{1,360\}\)[a-z
> A-Z0-9 ]\{5\}/\1${LINEITNUM}/" $LFILE > $TMPFILE
>
> Please help me put this 2 year old problem of mine officially to rest.
1. Use GNU sed.
2. Play with
cut -c1-359
cut -c360-364
cut -c365-
--
William Park, Open Geometry Consulting, <opengeometry@yahoo.ca>
Linux solution for data management and processing.
[ Post a follow-up to this message ]
|