Is there any way to view or access javascript portions of a web page from the linux shell?

For example, I use curl to pull a web page that has text and javascript. The javascript portion does not show up, just the filename as it is in the source.

You will have to try to download the separate file, which ought to be protected, but looks like it is not.

It's the same ideas as downloading a script like this:

grep 'stuff' myfile

The download does not get the grep executable. Same idea.

Interesting, so you are saying that I can extract the url of the javascript from the downloaded page and then use curl again to pull the javascript page?

It looks like javascript appears in the page like this:

<script type="text/javascript" src="http://url/script.js"> </script>

Are you saying I can run:
curl http://url/script.js

?

Thanks much,
Lconvoy

If the js is visible like that, then you can wget the file, and I guess curl works too.