On Wed, 30 Jun 2004 12:15:15 +1200
Phill Coxon <[EMAIL PROTECTED]> wrote:
> Not at all. :)
>
> On Wed, 2004-06-30 at 12:09, Nick Rout wrote:
> > does it have to be sed?
>
#!/bin/bash
for line in $(cat $1) ; do
echo $line
echo "["$line"]"
echo "*"${line}"*"
done
unfortunately, and for reasons unknown to me it doesn't work properly on
lines with a space in.
eg (the script is called forphil)
$ cat testin
foo
bar
foo bar
$ forphil testin
foo
[foo]
*foo*
bar
[bar]
*bar*
foo
[foo]
*foo*
bar
[bar]
*bar*
--
Nick Rout <[EMAIL PROTECTED]>