Steve_BZ has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I'm looking for a cpan module which reads through some sort of file (eg a shell file) and executes system commands, and then checks for errors. It seems like this was what perl was built for:
Eg I might have a text file called update.sh, that looks like this:
apt-get -y install ffmpeg cpan -i FFmpeg::Command cp a.png b.png svn co ...... tar ............ etc etc etc
You get the idea. What I would like is a perl module that can read through such a file and execute the system maintenance commands on a remote PC.
These are my limitations:
- It does not need to be synchronous (although it can be).
- It is running behind a router or firewall *(this means I probably can't log on to it), so it will have to periodically download a file with a series of commands in it from a convenient server.
- It should provide a log of activity that can be analysed or uploaded to a server later.
What do you think?
I am looking at Net::SSH::Perl and Sys::Manage::Desktops, but I'm not sure yet whether they meet my needs. How do you do this on your setups?
Thanks and regards
Steve
* = Update
Back to
Seekers of Perl Wisdom