D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Sed experts wanted, perhaps?

 

On 19/04/13 21:36, Grant Phillips-Sewell wrote:
As it is, if I have no # symbols, it will work fine... however pop a #
in there and it fails. It also fails with # symbols if I wrap the last
line as:

Could you describe what goes wrong?

Another approach you could try is pushing the input into twidge via stdin, e.g.

#!/bin/sh
# completely untested
echo $@ | twidge update

You might also want to be using $* (acts as a single item) rather than $@ (acts as N items, see "man bash", section "Special parameters"), but I'm not quite sure of your use case.

Cheers,

Mike.

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq