This really is a great post, sometimes it doesn't seem to be immediately sufficient to check for $^O and recollect what system commands to execute...
UnxUtils gives you a front to execute *nix commands right on MSWin if you seek such functionality, it works for me just fine..
Here's a quick shot at it:
- create a folder (independent folder) for it, I named the folder 'UnixUtils'- note the tool is UnxUtils- and its path is 'C:\UnixUtils'.
- Unzip the package to that folder.
- Edit the perl 'Path' in the 'environmental variables' to include a path to 'C:\UnixUtils\usr\local\wbin'
You're good to go...
#This is from a Windoze box cmd :
C:\Documents and Settings\m>perl -
print `ls -la`;
__END__
total 10817
drwxrwxrwx 1 user group 0 Jun 6 2009 .
drwxrwxrwx 1 user group 0 May 28 2009 ..
drwxrwxrwx 1 user group 0 Jun 13 2009 01-First Week
drwxrwxrwx 1 user group 0 Jun 18 2009 02-Second Week
drwxrwxrwx 1 user group 0 Jun 29 2009 03-Third Week
drwxrwxrwx 1 user group 0 Jul 4 07:31 04-fourth week
check the page http://unxutils.sourceforge.net/ it got some of the commands supported by the UnxUtils tool though the page is not so up-to-date but it can give a nice overview.
Excellence is an Endeavor of Persistence.
Chance Favors a Prepared Mind.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.