[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A Lua formatter with LPEG
- From: TNHarris <telliamed@...>
- Date: Tue, 12 Feb 2013 15:08:44 -0500
On Sunday, February 10, 2013 09:26:13 PM Steve Litt wrote:
>
> cat program.bak | sed -e 's/;\s*$//'
I'm going to have to report you for a Useless Use of Cat[1].
sed -e 's/;\s*$//' < program.bak
Or...
sed -i.bak -e 's/;\s*$//' program.lua
Or...
lua -e 'for l in io.lines"program.lua" do print((l:gsub(";%s*$",""))) end'
Just in case sed isn't available.
[1] http://www.partmaps.org/era/unix/award.html
--
tom <telliamed@whoopdedo.org>