Linux - python vs sh
Sybren Stuvel
sybrenUSE at YOURthirdtower.imagination.com
Thu Jul 17 07:15:57 EDT 2003
Krisztian Kepes enlightened us with:
> I want to list my rpm database to file with this:
Besides the answers you already got, you might like this too:
> echo '>>>>>>>>>>>>>>>' >>$file
> echo "$nr." >>$file
> echo "Name: $rpmname" >>$file
> echo "" >>$file
> info=`rpm -qi $rpmname`
> echo "$info" >>$file
> echo "" >>$file
can be re-written as:
(
echo '>>>>>>>>>>>>>>>>'
echo "$nr."
echo "Name: $rpmname"
echo
rpm -qi $rpmname
echo
) >> $file
Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
More information about the Python-list
mailing list