codeseeker Posted November 14, 2013 Posted November 14, 2013 Im trying to run a Filecopy against various unkown computers. Im trying to create a quick and dirty shotgun script where I can pass thru the hostname in the path via command line. Im under a timeline so I did only 20 mins of research. I am not a person who writes scripts frequently. However I am more familiar with Perl. I am looking for an array that can hold a value from command line, such as what ARGV does in PERL. Please Help.
Moderators JLogan3o13 Posted November 14, 2013 Moderators Posted November 14, 2013 (edited) Hi, ImperialLeader. You can do something like this: If $CmdLine[1] = "/s" Then $host = "MyPC" EndIf Edited November 14, 2013 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Solution codeseeker Posted November 20, 2013 Author Solution Posted November 20, 2013 Excellent! that worked like a charm. Thanks!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now