Twitter (not set)
Blog (not set)
Website (not set)

2

Open Windows internet shortcut (*.url) files in firefox

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

— by tsjswimmer on Sept. 12, 2014, 12:06 a.m.

Explanation

Basically the same as my other command, except the URL is piped to Firefox using xargs, as opposed to being put in parenthesis with a dollar sign.

0

Open Windows internet shortcut (*.url) files in firefox

 $ firefox $(cat file.url | grep -i ^url=* | cut -b 5-)

— by tsjswimmer on Sept. 11, 2014, 10:03 a.m.

Explanation

Opens a .url file in Firefox which in the above example, is called file.url (Windows .url files are basically just text files, so they can be parsed with a few commands). In the above example, cat is used to load the file, grep is used to filter out unnecessary lines (the caret(^) should help remove those pesky "BASEURL" lines), and cut is used to remove the first five characters of the remaining line (which should be URL=), leaving only the web address (which should be everything from character 5 until the end of the line), which will be piped into Firefox.

Limitations

This hack has not been tested with URL's which use "specail characters" (quotes, semi-colons, ect), except ampersands, percent signs, and question marks. Tested only on gnu/linux (using bash and sh).