[Pm-utils] remove_parameters() function is broken
Peter Wegas
71117c at gmail.com
Sat Apr 3 11:20:32 PDT 2010
the remove_parameters() function in /usr/lib/pm-utils/functions tries to use
grep to remove parameters from the parameter list:
"if [ "$1" = "all" ]; then
echo '' > "$PARAMETERS.new"
else
echo '' >"$PARAMETERS.rm"
for p in "$@"; do
echo "$p" >> "$PARAMETERS.rm"
done
# let grep do the dirty work.
grep -vxFf "$PARAMETERS.rm" "$PARAMETERS" > "$PARAMETERS.new"
fi"
but since $PARAMETERS.rm has an empty line at the beginning, grep will just
write $PARAMETERS to sdtout.
this behavior of grep is intented.
see:http://lists.gnu.org/archive/html/bug-grep/2010-04/msg00037.html
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pm-utils/attachments/20100403/83286e0e/attachment.htm>
More information about the Pm-utils
mailing list