title: Read line containing String (Bash)
body: <p>I have a file, and its something like this:</p>
  
  <pre><code>Device: name1
  random text
  Device: name2
  random text
  Device: name3
  random text
  </code></pre>
  
  <p>I have a variable: MainComputer</p>
  
  <p>What I want to get (for each name, i have like 40 names): </p>
  
  <pre><code>   MainComputer -&gt; name1
     MainComputer -&gt; name2
     MainComputer -&gt; name3
  </code></pre>
  
  <p>What I have:</p>
  
  <pre><code>var="MainComputer"   
  var1=$(awk '/Device/ {print $3}' file)
  echo "$var -&gt; $var1"
  </code></pre>
  
  <p>This only gives the arrow "->" and the link for the first variable, I want them for the other 40 variables...</p>
  
  <p>Thanks anyway!</p>