title: Bash script to find filesystem usage
body: <p>EDIT: Working script below</p>
  
  <p>I have used this site MANY times to get answers, but I am a little stumped with this.</p>
  
  <p>I am tasked with writing a script, in bash, to log into roughly 2000 Unix servers (Solaris, AIX, Linux) and check the size of OS filesystems, most notable /var /usr /opt.</p>
  
  <p>I have set some variables, which may be where I am going wrong right off the bat.</p>
  
  <p>1.) First I am connecting to another server that has a list of all hosts in the infrastructure. Then I parse this data with some sed commands to get a list I can use properly</p>
  
  <p>1.) Then I do a ping test, to see if the server is alive. If the server is decom. The idea behind this, is if the server is not pingable, I don't want it being reported on, or any attempt to be made to connect to it, as it is just wasting time. I feel I am doing this wrong, but don't know how to do it corectly (a re-occurring theme you will here in this post lol)</p>
  
  <p>If any FS is over 80% mark, then it should output to a text file with the servername, filesystem, size on one line  &lt;== <strong><em>very important for me</em></strong></p>
  
  <p>If the FS is under 80% full, then I don't want it in my output, it can me omitted completely.</p>
  
  <p>I have created something that I will post below, and am hoping to get some help in figuring out where I am going wrong. I am very new to bash scripting, but have experience as a Unix admin (i have never been good at scripting).</p>
  
  <p>Can anyone provide some direction and teach me where I am going wrong?</p>
  
  <p>I will upload my script that i can confirm is working hopefully tomorrow. thanks everyone for your input in this!</p>