Unix administration - Re: Python code to replace shell scripts

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > January 2004 > Re: Python code to replace shell scripts





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Python code to replace shell scripts
Cameron Laird

2004-01-23, 4:46 pm

In article <mailman.81.1071167444.9307.python-list@python.org>,
Daven Nair <nair_260@hotmail.com> wrote:
quote:

>Hi,
>
>I would like to know if Python supports codes similar to shell scripts:
>
>count=`ps -ef|grep "pattern"|wc -l`
>for count in `echo $count`
> do
> done
>fi
>
>Can I export a variable say var from os.system("var=`ps -ef|grep pattern|wc
>-l`")


Cameron Laird

2004-01-23, 4:55 pm

In article <mailman.81.1071167444.9307.python-list@python.org>,
Daven Nair <nair_260@hotmail.com> wrote:
quote:

>Hi,
>
>I would like to know if Python supports codes similar to shell scripts:
>
>count=`ps -ef|grep "pattern"|wc -l`
>for count in `echo $count`
> do
> done
>fi
>
>Can I export a variable say var from os.system("var=`ps -ef|grep pattern|wc
>-l`")


Cameron Laird

2004-01-23, 5:10 pm

In article <mailman.81.1071167444.9307.python-list@python.org>,
Daven Nair <nair_260@hotmail.com> wrote:
quote:

>Hi,
>
>I would like to know if Python supports codes similar to shell scripts:
>
>count=`ps -ef|grep "pattern"|wc -l`
>for count in `echo $count`
> do
> done
>fi
>
>Can I export a variable say var from os.system("var=`ps -ef|grep pattern|wc
>-l`")


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com