From: mike@... (Mike Stok) Date: 2003-04-30T01:50:38+09:00 Subject: Re: Can I add more than one command by using ruby -pe ' '? In article , wrote: >Hi -- > >On Mon, 28 Apr 2003, Vee Satayamas wrote: > >> Can I add more than one command by using ruby -pe ' '? ( I 'm sorry >> to ask naive question. ) > >Sure: > > $ ruby -pe 'sub!(/a/,"b"); $_.capitalize!' > a # input > B # output or even using multiple -e's : [mike@ratdog mike]$ ruby -p -e 'sub!(/a/,"b")' -e '$_.capitalize!' a B Hope this helps, Mike -- mike@stok.co.uk | The "`Stok' disclaimers" apply. http://www.stok.co.uk/~mike/ | GPG PGP Key 1024D/059913DA mike@exegenix.com | Fingerprint 0570 71CD 6790 7C28 3D60 http://www.exegenix.com/ | 75D2 9EC4 C1C0 0599 13DA