-
-
Save sasqwatch/08a7745d55554a2c2ef8c3f2fb4ceca1 to your computer and use it in GitHub Desktop.
oneliner to open a bunch of hosts/urls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
firefox `cat urls.txt | awk '{if(index($1,"http")){print $1}else{print "http://"$1;print "https://"$1}}' | |
firefox `cat urls.txt | awk '{if(index($1,"http")){print $1}else{print "http://"$1;print "https://"$1}}' | tr "\n" " "` | |
chromium-browser `cat urls.txt | awk '{if(index($1,"http")){print $1}else{print "http://"$1;print "https://"$1}}' | |
chromium-browser `cat urls.txt | awk '{if(index($1,"http")){print $1}else{print "http://"$1;print "https://"$1}}' | tr "\n" " "` | |
function oopen() { | |
firefox `cat $1 | awk '{if(index($1,"http")){print $1}else{print "http://"$1;print "https://"$1}}' | |
} | |
ALTERNATIVES: | |
@MaplesonMaple | |
Firefox/Chrome plugin | |
https://github.com/htrinter/Open-Multiple-URLs | |
@honze_net | |
cat urls.txt | xargs firefox | |
cat urls.txt | awk '{print ($1 ~ "://") ? $1 : "http://"$1"\nhttps://"$1}' | xargs firefox |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment