title: How to append host name to a single text file from different servers in lan
body: <p>I am installing a app by running a script on number of servers (say 10), at the end I need to get a list of servers that the secript run in a single file.
  Ex:</p>
  
  <pre><code>Server-1
  Server-2
  Server-3.....Server-10
  </code></pre>
  
  <p>I tried with this, but it is creating agent_name_list.txt on local box with only that hostname.</p>
  
  <p>Any Idea how can I get a consolidated list of servers that agent installed by script in one place?</p>
  
  <pre><code>agent_name='hostname'
  nslookup $agent_name | grep Name | awk '{print $2}' &gt;  /var/tmp/$agent_name_list.txt 
  </code></pre>