[Tutor] Equivalent to perl -e

nibudh nibudh at gmail.com
Tue Oct 17 07:47:05 CEST 2006


On 10/17/06, David Rock <david at graniteweb.com> wrote:
>
> * Alan Gauld <alan.gauld at btinternet.com> [2006-10-16 17:32]:
> >
> > Why?
> > Why not just put it in a Python script?
> > I'm missing something I think.
>
> I don't think you are missing anything.  It was something that just sort
> of happened one day.  I was trying to do something fairly simple in a
> shell script and didn't have a good way to get the date info I wanted,
> so I started playing around with python -e.  It really SHOULD just be a
> python script that calls shell stuff, not the other way 'round :-)
>
>
Hi, list.

This is my first post...

What i've found is that my quick and dirty oneliners can go from host to
host with me and having them "all in one file" makes it easier to move
around or share...

Recently i wrote a shell script called "hostingdata" that returns a report
on a given domain name. It mostly stays on my monitoring server and i have
broken out some of the functions into a seperate file so i can reuse them in
other scripts.

However one of the helpdesk guys saw the script and he wanted to be able to
run it from his computer, I bundled up the functions back into the main
script and copied it into his ~/bin.

It just seemed easier that way. One needs to gauge whether doing this is
likely to cause more problems than it's worth... but for small scripts with
a small user base this would seem to work fine.

Cheers,

nibudh.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061017/3036eb89/attachment.html 


More information about the Tutor mailing list