title: How can I cat a remote file to read the parameters in Bash?
body: <p>How can I <code>cat</code> a remote file? Currently, it works for local files only.</p>
  <pre><code>#!/bin/bash
  regex='url=(.*)'
  # for i in $(cat /var/tmp/localfileworks.txt);
  for i in $(cat http://localhost/1/downloads.txt);
  do
          echo $i;
          # if [[ $i =~ $regex ]]; then
          #echo ${BASH_REMATCH[1]}
          #fi
  done
  </code></pre>
  <blockquote>
  <p>cat: http://localhost/1/downloads.txt: No such file or directory</p>
  </blockquote>