Script traceroute to accespt multiple addresses via command line



Hi everybody -
I have a networking assignment that has a twist that I am having
trouble with. The assignment is to write a bash script that will run
ping and traceroute on a "set of urls" and output certain extracted
data to a text file. I do not need help with the traceroute/ping/
output part of the script, but I do not have enough Linux knowledge to
get the script to accept multiple arguments for a command like
traceroute that really only wants one address at a time.

The question does say that the user should be able to enter any number
of addresses on the command line, so it would look like:

paul@xxx> traceroutescript.sh address1 address2 address3 etc etc

I am thinking that this calls for an array but I frankly have no idea
how to manipulate arrays via shellscript. Any help would be greatly
appreciated. I am not asking for people to do my homework for me; I
simply would like some guidance in getting a script like the one
described to accept multiple arguments. If there's a website that has
some fairly dumbed down array (or other, if I am wrong about this)
tutorials, that would be great.

Any and all help appreciated,
TIA,
paul

.



Relevant Pages

  • Re: Script traceroute to accespt multiple addresses via command line
    ... I have a networking assignment that has a twist that I am having ... The assignment is to write a bash script that will run ... paul@xxx> traceroutescript.sh address1 address2 address3 etc etc ... I am thinking that this calls for an array but I frankly have no idea ...
    (comp.os.linux.misc)
  • Re: Logon script - function array and select case not working
    ... this all works well, except, the function i am using for the rules in the control script causes alot of querrys to AD. as there are alot of groups. ... objTSout.writeline retrv ... So if you think that this will assign an array value to the variable, how do you think the case select statement is going go compare this array value with the literal string values such as "group name here"? ... However, by not assigning ANY value to checkgrp in the function, you are guaranteeing that, should the function ever exit, it will return no information. ...
    (microsoft.public.scripting.vbscript)
  • Re: Perl: Subroutines and use of the "GD::Graph::bars;" Module
    ... I have been looking at the script once again, I could not really get your suggestion to work, but I have been doing some new changes thought. ... @array = sort @array; ... sub verbose { ... Global symbol "$title" requires explicit package name at ./bars.pl line 53. ...
    (perl.beginners)
  • Re: string retrieval issue
    ... Chicago Bears|NFC North ... not writing the third element back to the array). ... You didn't include it in your script. ... Fear is the mind-killer. ...
    (comp.lang.perl.misc)
  • Re: Perl: Subroutines and use of the "GD::Graph::bars;" Module
    ... I did what you told me, but I just gets this error msg in return when I am trying to execute the script: ... And I also get this error msg even when I am not commenting out the settings around line 93? ... @array = sort @array; ... sub verbose { ...
    (perl.beginners)