Presently I think sed is the tool, as eventually the input will be a
multi-line text file;

cat $FILE | sed -e 'fiddle about with every line' > $OUTPUT

gc


On 28 June 2011 13:55, Nick Rout <[email protected]> wrote:

> On Tue, Jun 28, 2011 at 1:06 PM, Glenn Cogle <[email protected]> wrote:
> > Hi all sed gurus (& wannabes like me),
> >
> > Wanting to `sed` beyond my present understanding;
> >
> > echo abcdefghijklmnopqrstuvwxyz | sed 'keep first 5 chars, then append a
> Z
> > to every fourth char thereafter, and keep the leftovers too'
> >
> > ie
> >
> > abcdefghiZjklmZnopqZrstuZvwxyZz
> >
> > I think sed would be capable of this - but haven't proven it yet.
> >
> > gc
>
> Is sed the tool for this? I would have thought python might be the
> answer, although don't ask me to actually do it). Or perl perhaps.
>
> if you want to cut up a string, cut can be quite useful.
>
> _______________________________________________
> Linux-users mailing list
> [email protected]
> http://lists.canterbury.ac.nz/mailman/listinfo/linux-users
>
_______________________________________________
Linux-users mailing list
[email protected]
http://lists.canterbury.ac.nz/mailman/listinfo/linux-users

Reply via email to