On 07 Jul 19:50, Jonathan McDowell wrote:
On Wed, Jul 07, 2010 at 07:20:03PM +0100, Richard Parsons wrote:
I'm trying out edbrowse. I've been looking for an easy to script browser with full javascript support for a long time, and it looks like it may be the ticket.
I want to script it like this, but I don't know how to echo a new line:
echo "e http://yahoo.com%5Cn1,$n" | edbrowse
How do I properly echo a new line? I'm sure that the answer will no doubt make me slap my own head...
echo -e "e http://yahoo.com%5Cn1,$n" | edbrowse
(You might want $n instead of just $n as well - I don't know if n is actually a variable or $n a command.)
Which would work... 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...
Cheers,