How to use JavaScript in UNIX Shell scripting?

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to use JavaScript in UNIX Shell scripting?
# 1  
Old 05-21-2017
How to use JavaScript in UNIX Shell scripting?

I want to navigate through a webpage and save that page in my system local automatically. How can I do that by using JavaScript in a Unix shell script. Any suggestions are welcome!
# 2  
Old 05-22-2017
I don't know about a Unix Shell, but Power Shell might do it. Your *.ps1 file would be on your desktop and would contain the commands "Invoke-WebRequest" and "pscp", to be followed by "Remove-Item" once the file is on your unix box. On your PC, the directory C:\Windows\System32 must contain "pscp.exe".

We have to download an updated web page several times a month. I'm not the Power Shell guru in this shop.
# 3  
Old 05-23-2017
If you are running this under Linux, you should look at wget or curl. The point isn't that a webpage is written in Java script, its that you want to bring back web content and look through it. Either curl or wget will do that. There may be other tools as well. For example Perl and Python might have modules that will help you with this.
# 4  
Old 05-23-2017
Basically, you don't. You discover what URL the javascript is retrieving, and retrieve that.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

unix Shell scripting

Hi All, need help to complete the automation but stuck at a perticular situation below is the code <code> fixed_function_name { code.... code.... variable_map= { a="/a" b="/b" c="/c" so on... } (7 Replies)
Discussion started by: yadavricky
7 Replies

2. Shell Programming and Scripting

UNIX shell scripting

Hi Guys, I suppose I have a file with these values 1 2 3 4 5 6 and I want to count how many values do I have. I know is I had the values in lines I will use wc -l How can I do that ? Thanks in advance... (2 Replies)
Discussion started by: Phuti
2 Replies

3. UNIX for Dummies Questions & Answers

Unix Shell Scripting( Calling from Unix to PLSQL)

Hello Experts, I have the following questions to be discussed here at this esteemed discussion forum. I have two Excel sheets which contain Unix Commands llike creating directory the structure/ftp/Copy/Zip etc to basically create an environment. I need help in understanding some of... (1 Reply)
Discussion started by: faizsaadq
1 Replies

4. Shell Programming and Scripting

Unix shell scripting help

Hi , I am beginner in Unix. I have a string /aa/bb/cc/dd. I want to extract the sub string /aa/bb/cc from this . How do i do that in bash? (1 Reply)
Discussion started by: vignesh53
1 Replies

5. Shell Programming and Scripting

unix shell scripting

hi experts, i m a btech mini project is making a secure unix shell which is intented to stop mal practice in educational other words need to create a new shell in which commands like cp do not work....can anyone suggest me how to begin with it....refrence... (3 Replies)
Discussion started by: vikas MENON.S
3 Replies

6. Shell Programming and Scripting

How to use javascript code in unix shell?

Hi Need help...I have wrritten one code for html through shell scripting in that i am using java scripts to validate some condition and open the html page without clicking the button.... Code Details echo "<script type="text/javascript">" echo "function exec_refresh()" echo "{" ... (4 Replies)
Discussion started by: l_gshankar24
4 Replies

7. Shell Programming and Scripting

unix shell scripting

i have a file blah_blah_blah_yyyymmdd.dat . I need to write a shell script to extract this date and compare it with the current date. How do i do this?? Can someone provide me with the code please? (1 Reply)
Discussion started by: swarna bhat
1 Replies

8. UNIX for Advanced & Expert Users

Need your Help on Unix Shell Scripting.........

Hi Friends, 1. Bash Shell Scrpt to take backup at evening 2. I need a bash shell script for killing all processes. (5 Replies)
Discussion started by: vinayraj
5 Replies

9. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies

10. UNIX for Dummies Questions & Answers

Unix shell scripting

I need to write a script which analyses an invoice file, counting the amount of pages in the file to be printed per account number and per invoice. The account numbers are stored in another file which has instructions on what do with ach customers invoice as per their account number. please... (6 Replies)
Discussion started by: la_burton
6 Replies
Login or Register to Ask a Question

Featured Tech Videos