Results 1 to 1 of 1
Code:
#!/bin/bash
#Chrometabs feeds a sitelist to Chromium, so each site opens in tabs at launch.
#SYNOPSIS: chrometabs [/path/to/sitefile]
#sitelists should be raw text files in the form: site<space>\n
#where ...
- 10-19-2009 #1
Chromium Tabs Script!
Code:#!/bin/bash #Chrometabs feeds a sitelist to Chromium, so each site opens in tabs at launch. #SYNOPSIS: chrometabs [/path/to/sitefile] #sitelists should be raw text files in the form: site<space>\n #where "<space>" is a literal whitespace, and "\n" means "newline" #blank lines are permitted SITES=$(tr -d '\r\n' < $1) chromium-browser $SITES exit 0
OK, it's not really that remarkable. In fact I'm posting it here so I can improve this a bit, but since the Chromium project hasn't as yet provided us with a way to save sessions, and frankly I'm not sure I want to save them anywhere within the browser (as opposed to a discreet file), I've whipped up this very short script.
What I want help with is creating a space at the end of each line automatically through stream editing (either through sed, tr, or some other command), so I don't have to do so when I'm pasting sites into the sitelist during a browsing session. I suspect two pipes of sed with a regex line I don't know how to write would do the job. Maybe.
To be more explicit (even though the script says it), the purpose is to read sites from a sitelist and open them in tabs with Chromium. I believe this does the same thing with sed:But I don't know how to make sed add a space...Code:sed -e `s/^V^M//g`$1
Any help would be appreciated, and if you find this useful at all, please don't keep quiet about it.
Thanks!


Reply With Quote