Jump to content

looking for a way to hold a value from command line in an array


Go to solution Solved by codeseeker,

Recommended Posts

Posted

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
Posted (edited)

Hi, ImperialLeader. You can do something like this:

If $CmdLine[1] = "/s" Then
    $host = "MyPC"
EndIf
Edited 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!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...