Last active
November 26, 2022 22:56
-
-
Save gwen001/cacba9ea0f5c8b36364bfd4681fe852a to your computer and use it in GitHub Desktop.
oneliner to open a bunch of hosts/urls
This file contains 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