Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Linux - python vs sh

Reply
Thread Tools

Re: Linux - python vs sh

 
 
Sybren Stuvel
Guest
Posts: n/a
 
      07-17-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?
 
Reply With Quote
 
 
 
 
Cameron Laird
Guest
Posts: n/a
 
      07-17-2003
In article <(E-Mail Removed)> ,
Sybren Stuvel <(E-Mail Removed)> wrote:
.
.
.
>can be re-written as:
>
>(
> echo '>>>>>>>>>>>>>>>>'
> echo "$nr."
> echo "Name: $rpmname"
> echo
> rpm -qi $rpmname
> echo
>) >> $file

.
.
.
.... or, for that matter,
echo ">>>>>>>>>>>>>>>>
$nr.
Name: $rpmname

`rpm -qi $rpmname

" >> $file
among other variants.
--

Cameron Laird <(E-Mail Removed)>
Business: http://www.Phaseit.net
Personal: http://phaseit.net/claird/home.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Python Tkinter Linux Repair Question/ Python TCP Socket Example My Python Python 3 06-16-2010 08:57 PM
Re: Is Netscape Leaving Firefox Behind on GNU/Linux? THE LINUX PROPAGANDA MACHINE CONTINUES. FIREFOX IGNORING LINUX............. traci.manicotti@gmail.com Computer Support 2 10-20-2007 02:12 PM
Linux... yeah linux.. Linux Have a nice cup of pee NZ Computing 19 04-17-2006 10:16 AM
You python-list@python.org are not member (linux-sh ML) linux-sh-admin@m17n.org Python 0 09-28-2005 09:06 AM
new comp.lang.python mirror at lampfroums.org--any Linux, Apache, MYSQL, Python Apps? astro Python 5 12-09-2004 11:45 AM



Advertisments