bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

variable creation


From: List User
Subject: variable creation
Date: Fri, 31 Dec 2004 09:25:01 +0900

I've been using bash for years, and along with a coworker, we could not figure out how create and use a variable based on........ err. well here's what i'm trying to do.

something like this...

for each in 81 82 83 84 ; do
  IP_${each}=$(nmap -sV -v -v -O 192.168.2.$each)
done

then somehow I want to be able to use $IP_$each but of course bash doesn't like this.

Can anyone help me out?

Cheers,
-Todd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]