Jump to content
Sign in to follow this  
codeseeker

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

Recommended Posts

codeseeker

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.

Share this post


Link to post
Share on other sites
JLogan3o13

Hi, ImperialLeader. You can do something like this:

If $CmdLine[1] = "/s" Then
    $host = "MyPC"
EndIf
Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
codeseeker

Excellent! that worked like a charm. Thanks!

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×