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)

Use find(1) not du(1) and simplify to:

rm $( find . -name lock | grep .mozilla )

Assuming that the script is run from the home directory where the
.mozilla directory resides.

   carl
--
   carl lowenstein         marine physical lab     u.c. san diego
                                                [EMAIL PROTECTED]


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to