Carl Lowenstein wrote:
On 3/10/07, Ralph Shumaker <[EMAIL PROTECTED]> wrote:
Ralph Shumaker wrote:
> Steve Bibayoff wrote:
>
>>
>> You might wqnt to take a look at:
>> man pkill
>> man pgrep
>>
> (In the version I posted, (after a cat to the terminal (if run from
> one)) it ends by erasing that script file, but I could easily #remark
> that out. And pgrep/pkill won't help me with a leftover lock file, so
> I still have to create a script to do that..., unless there is another
> way. (And knowing *nix, there probably is. (Anyone?)))
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.
Use find(1) not du(1) and simplify to:
rm $( find . -name lock | grep .mozilla )
So $( ... ) indicates a sub-command. (This will certainly help me many
times to come. Thanks)
Assuming that the script is run from the home directory where the
.mozilla directory resides.
That's why I did the initial "cd ~" (which seems to have been snipped
away somewhere along the way, along with all the rest of the script).
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list