Ralph Shumaker wrote:
Carl Lowenstein wrote:
On 3/10/07, Ralph Shumaker <[EMAIL PROTECTED]> wrote:
Anyone know of a way to take this:
> du -a | grep \./\.mozilla/.*/lock | sed -e 's/^[0-9]*\s*\.\//rm ~\//'
> >> ~/remove-mozilla-lock-file
(whose output would be something like "rm
~/.mozilla/default/763qpx3h.slt/lock",)
and turn it into a command that gets executed without having to put it
into a script and executing the script? Not having to create and
execute a secondary script would reduce the first script file to 4
lines.
sh -c $( du -a | grep \./\.mozilla/.*/lock | sed -e
's/^[0-9]*\s*\.\//rm ~\//' )
ought to work. (untried)
I'll have to finish with Mozilla before I try that. Thanks.
$ sh -c $( du -a | grep \./\.mozilla/.*/lock | sed -e
's/^[0-9]*\s*\.\//rm ~\//' )
rm: too few arguments
Try `rm --help' for more information.
Use find(1) not du(1) and simplify to:
rm $( find . -name lock | grep .mozilla )
That one worked. Thanks Carl.
Resulting script:
#!/bin/bash
cd ~
pkill -u $USER mozilla-bin
rm $( find . -name lock | grep \./\.mozilla/default/ )
(This will help my impatient friend a lot.)
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list