[NTLUG:Discuss] Scripting help
Leroy Tennison
leroy.tennison at verizon.net
Fri Sep 26 21:32:19 CDT 2014
First of all, on this platform I don't have the ability to create a file
such as hostlist. I'm copying my list from Windows and pasting it into
Putty. What I tried was:
for i in $(host1
host2
host3); do telnet $i; done
and got "bash: couldn't find command host?" for each host.
Please keep up with the ideas, I'm trying every one of them.
On 09/26/2014 12:30 AM, Steve Litt wrote:
> On Fri, 26 Sep 2014 00:02:55 -0500
> Rusty Haddock <rusty at fe2o3.lonestar.org> wrote:
>
>> I wasn't quite sure what you were asking for but here
>> is my shot.
>>
>> If that list of hosts, one per line, can go into a file try this:
>>
>> for i in $(cat hostlist)
>> do
>> telnet $i
>> done
>>
>> I'm starting to be won over by the $( commands ) notation
>> instead of grave accents.
> I thought that was valid only on bash, but it just worked for me on
> dash, zsh and ksh. Maybe I'll start using that instead of backticks.
>
> Thanks,
>
> SteveT
>
> Steve Litt * http://www.troubleshooters.com/
> Troubleshooting Training * Human Performance
>
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>
More information about the Discuss
mailing list