
Apologies for not being more specificin my reply. T'was specificallythe absence of the " symbols I was referencing in the bash one-liner. Obviously the variable name has no effect (caps vs lower). Just the variable I typically type out for loops like this. Glad to hear it was just a source-text-file issue.
-Chris
On 7/4/13 6:51 AM, Rob J. Epping wrote:
On Thu, Jul 4, 2013 at 6:41 AM, Paul Gear observium@gear.dyndns.org wrote:
On 07/04/2013 01:46 PM, Rob J. Epping wrote:
Hi,
On Jul 4, 2013 12:23 AM, "Paul Gear" observium@gear.dyndns.org wrote:
Chris, your script is functionally identical to David's. Changing variables to upper case and leaving out the quotes will make no difference.
Quotes do make a difference when there is a space in the file. Because of the quotes it will become part of the hostname.
In the scripts that David & Chris have used, each word in the file would cause a separate iteration of the loop, so there are no circumstances under which $NODE in Chris' script would be different to "$file" in David's.
Not completely true. $NODE or $file does not make a difference, but "$file" is different from $file, especially when $file is set to abc123[space]
you can check it out by using bash -x <script>.
GRTNX, RobJE _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium