lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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>