[GRLUG] Sed Limitations

zdennis zdennis at mktec.com
Fri Dec 8 14:49:35 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

zdennis wrote:
> Another way to solve this...
> 

Or the perl-like one liner in ruby...

$ cat test | ruby -e "sc=3,3,6,6;s,pos=[],0;d=STDIN.read;sc.each{|c|s<<d[pos...pos+=c]};puts s.join(',')"
123,456,justin,denick

Zach
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFecHPMyx0fW1d8G0RAuTfAJ4vBkJA+J9O2QpqoPcoaGkP+XJeEgCcCTRW
f4/DReBp51S8iDryG64Gf6g=
=00gG
-----END PGP SIGNATURE-----


More information about the grlug mailing list