$ grep -i url='*' file.url | cut -b 5- | xargs firefox

Sept. 12, 2014, 12:06 a.m.tsjswimmer


Extract urls from a *.url file and open in Firefox. (Note that *.url files in Windows are basically just text files, so they can be parsed with a few commands.)

  • grep extracts lines starting with url=
  • The -i flag is to ignore case
  • cut extracts the range of characters from the 5th until the end of lines
  • xargs calls Firefox with arguments taken from the output of the pipeline