* Matthias Buecher / Germany <[email protected]> [02.02.2010 18:00]: > > Thanks Bastian, for your input. Much cleaner approach. > > What about the follwing (works fine on my router): > > grep -q -e "${PROG}" "/proc/${pid}/cmdline" && { > append ignore "${pid}" > break > } > > Or is there a special need for "grep -F" (=fgrep)?
i think it's faster and consumes lower mem - why to grep for regexp, when we search a simple string? in practise it does'nt matter 8-) > Also I would not suppress error messages with "2>/dev/null". but in this special case i think it is ok - so we must not check for existing file (grep output's an error message, if $PID doesnt exist anymore) bye, Bastian
signature.asc
Description: Digital signature
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
