|
Admission
opendir(DH,".");
for $sd (readdir DH) {
next if ($sd !~ /\./);
next if ($sd !~ /[a-z]/);
print "$sd backup ...\n";
`tar czf 20091119/20091119_$sd.tgz $sd`;
}
I admit it ... when it comes to the "crunch" and I need a quick script to do some systems admin work, it still has to be Perl!
The script above is currently running, via another window, on one of our two dedicated servers. "It's a very old machine - you should upgrade it" said their technician as he did a hard reboot for us yesterday; hmmm - it's not *that* old, but having heard a comment like that I think I'll ensure we have a fresh mirror of each virtual host ...
Learn how to write perl PROPERLY - i.e. commented, nicely structured, maintainable, without constants hard coded ... on our Perl Programming course. That will also equip you to write 'nasty' little scripts like the one above when you have the need! (written 2009-11-19, updated 2009-11-20)
Associated topics are indexed under Q102 - Choosing your language [3558] Python or Lua - which should I use / learn? - (2011-12-21) [3169] Rekeying a table - comparison in #Ruby #Perl and #Python - (2011-02-14) [2866] Ruby - how does it compare and where is it the right language? - (2010-07-11) [2700] The same very simple program in many different programming languages - (2010-03-31) [2536] All the Cs ... and Java too - (2009-12-13) [2535] When should I use Java, Perl, PHP, or Python? - (2009-12-13) [2048] Learning to program in PHP, Python, Java or Lua ... - (2009-02-19) [2001] I have not programmed before, and need to learn - (2009-01-19) [1990] Speaking all the languages - (2009-01-12) [76] Learning to program in - (2004-10-07)
Some other Articles
The story of the railway land at Melksham StationThe music of the stock marketA life lesson from the accuracy of numbers in Excel and LuaCommunity Area Partnership - inaugural AGMAdmissionGood example of recursion in Python - analyse an RSS feedI almost put the bins out this morningLearning to program in ...Melksham manslaughter case concludes - sort ofMonday night, Tuesday night
|
3603 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73 at 50 posts per page
This is a page archived from The Horse's Mouth at
http://www.wellho.net/horse/ -
the diary and writings of Graham Ellis.
Every attempt was made to provide current information at the time the
page was written, but things do move forward in our business - new software
releases, price changes, new techniques. Please check back via
our main site for current courses,
prices, versions, etc - any mention of a price in "The Horse's Mouth"
cannot be taken as an offer to supply at that price.
Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).
|
|