On Thu, 8 Jul 2010, Brett Parker wrote:
but I'm now bemused as to why the echo of the first line...
echo '1,$n' | edbrowse http://yahoo.com/
Would work just as well...
Or:
edbrowse <<EOF e http://yahoo.com/ 1,n$ EOF
Which removes the echo entirely, and makes it obvious what to run...
Yes, the "$n" is a literal string to be passed to edbrowse. "$" means the last line of the file and so "1,$n" means "print the lines from the first line to the last line including the line numbers".
I like your final version best with the EOF. It's very clear, thanks. I'm quite new to bash scripting.
By the way, I'm very excited to have found a browser that is easily scriptable. Suddenly it seems a breeze to write a shell script that will web scrape. Has everyone always been able to do this easily with other programs and I just never noticed?
Richard