5

Passing Command Line Args in a Single Variable?

view full story
linux-howto

http://www.unix.com – Hello All, I have a Bash Script and an Expect script that together will SSH to another server and do some stuff there... From within the Bash Script I process the Command Line Arguments, which are Required Args and Optional Args. When I call the Expect script from the Bash Script, I pass it all the required Args as there own variables: i.e. $ip_address, $username, $password, $option... Then, as I process any Optional Arguments I want to concatenate them into one Variable. Doing this will remove a whole bunch of If statements from my script that would, for example, if the optional argument (HowTos)