At this point in time, I've given up and walked away. Whether or not it is capable of doing such a thing is irrelevant when the solution is impossible to understand without a sheet of A1 and a box of crayons (:
Just use a basic interpreted language - bash, PHP, ruby, python, even
awk (probably), then when you revisit it in 6 months and decide you
actually only want 3 characters on the front, it'll take you 5 seconds
to change, not 10 minutes.
Me, I'm a KISS fan...
(:
Steve
On Tue, 2011-06-28 at 13:56 +1200, Glenn Cogle wrote:
> So far I've acheived;
>
> $ echo abcdefghijklmnopqrstuvwxyz | sed 's/\(.\{5\}\)\(.\{4\}\)/\1
> \2Z/g'
>
> Which returns abcdefghiZjklmnopqrZstuvwxyz
>
> ie I'm getting 5 + 4 = 9 chars, then 'Z'
>
> gc
>
>
> On 28 June 2011 13:06, 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
>
>
> _______________________________________________
> Linux-users mailing list
> [email protected]
> http://lists.canterbury.ac.nz/mailman/listinfo/linux-users
--
Steve Holdoway BSc(Hons) MNZCS <[email protected]>
http://www.greengecko.co.nz
MSN: [email protected]
Skype: sholdowa
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Linux-users mailing list [email protected] http://lists.canterbury.ac.nz/mailman/listinfo/linux-users
