Oct 22, 2013, 2:54 PM
Post #1 of 2
script not recognizing tabs as whitespace
New to the forum and hoping to see if anyone else is having this issue or if it is just me.
I have a scripts that I have been running on a Solaris 10 server for years. The script does an ssh to each of the servers, gets the list of filesystems, checks the space requirement based on filesystem information in a file. The filesystem file looks like this (tabs between entries):
#Filesystem Priority2 Priority1
/ 80 85
/usr/local 80 85
/usr/openv 80 85
/u01 80 85
This script was working great for many years and suddenly it stopped. After reviewing the code, I found that line
($mntpnt, $threshold1, $threshold2) = split(/\s+/, `grep "^$mount_point " $datadir/$host.filesystems`);
was no longer recognizing the tabs as whitespace. If I changed the tabs in the file to be spaces, the script would start working again. The only thing that has changed in the last couple of months has been:
1) Solaris 10 patching
2) Veritas VM upgrade
Has anyone else experience anything similar? My workaround was to change the tabs to spaces, but I would like to figure out why/what cause it to change.
Hoping someone smarter than me has some insight to share.