Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How I would go about opening multiple URLs from a text file as different tabs in Firefox/Chrome? My text file is just a list of URLs, one per line:

http://www.url1.com
http://www.url2.com
http://www.url3.com
http://www.url4.com
share|improve this question

2 Answers 2

Firefox uses the new-tab command, so you could pass the URLs in the file to the browser like so:

while read line; do
    firefox -new-tab "$line"
done < textfile.txt

With Chrome, the syntax is:

google-chrome "$line"
share|improve this answer

I think this may be a nice solution:

cat /home/username/anyfolder/allmyURLs.txt | xargs firefox -new-tab "$line"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.