The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 07-03-2009
prasperl prasperl is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 22
Did you initialize host file name?

I tried the same code snippet.The result is

Client is "BaculaServer-fd"

Hostname is Server_Bacula

ZABBIX_HOSTSFILE="path of map file"
I made two changes:

1.Initialized ZABBIX_HOSTSFILE to map file name


2.Removed []
grep "[$client]" $ZABBIX_HOSTSFILE
grep "$client" $ZABBIX_HOSTSFILE