Re: Python code to replace shell scripts
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix administration > Re: Python code to replace shell scripts




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: Python code to replace shell scripts  
Cameron Laird


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 09: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`")




[ Post a follow-up to this message ]



    Re: Python code to replace shell scripts  
Cameron Laird


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 09: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`")




[ Post a follow-up to this message ]



    Re: Python code to replace shell scripts  
Cameron Laird


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 10: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`")




[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:17 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register