Stephen_Reilly at dell.com wrote:
>> exec `ls .? | sed "s/^./grep -i \'&/g" | sed "s/$/\' file/g"`
> logs me out, can't say as I blame it either
I think it's meant to. Why are you using exec? The idea with exec is
that it completely replaces the currently running process with a new
one, the result is that the bash shell you were running is completely
obliterated, so that when the commands above finish that's it, the
process ends and you have no shell to return to.
I've only just reliased what you're trying to do and I reckong you want
eval, this will execute it's arguments as a command and will return you
to the shell when finished,
Fergal
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!