I have a file.txt with some urls and the name of the web. Something like:
WEB1: www.url.com WEB2: www.url2.com
(No space in the name, and there is a space after the colon) I want to be able to open a tab in Firefox for an specific web in that file. I have tried something like this:
xargs -a file.txt firefox -new-tab "$line"
This opens every word in the document as a new tab. I want to be able to select which url to open using the Web's name. I would open a single url at a time. The file would be around 100 lines long or so. Is there any simple way of doing this? Thanks!
As suggested from Bodo here is some details:
- There is a file
HOMEdirectory that contains lines as shown in the question.
- The key and the URL are separated by a colon and a space (
- You want to run a command
openurl foo bar bazwhere
bazare keys in the file like
WEB2without the trailing colon (