Shell Script to Capture a Screenshot


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell Script to Capture a Screenshot
# 8  
Old 11-24-2014
Quote:
Originally Posted by ankur328
Hi All,

Suppose I want to take a screenshot of a website say Google and save that image. How should I do it?

I tried wget with this but of no help. It just makes a particular file in jpeg format but on opening the same it says corrupted. Although I can edit the jpeg as an HTML file.

Code:
wget "http://www.google.com" -O /tmp/abc.png

Can someone please help me on this?

T&R
Ankur
IMHO, using wget on a website is not the same as getting a screen shot. The best you can do, as far as I know, is to get all of the images, html, etc using wget -m. It is probably analogous to using internet explorer to save the website. Hence you will have a directory of all of the files that are downloaded with the site. You can also try curl, but it probably works the same way.
# 9  
Old 11-24-2014
So is there any other way to capture the SS via terminal?
# 10  
Old 11-24-2014
You could have just copy-pasted instead of making a screenshot. I think you censored the bit I needed to know anyway. You also forgot cat /etc/release
# 11  
Old 11-24-2014
Quote:
Originally Posted by ankur328
So is there any other way to capture the SS via terminal?
You're in a terminal. There's no screen to shot.
# 12  
Old 11-24-2014
haha, actually it was my server name. :P. The screenshot was caught by SNIP tool in window. I have logged in to remote server via putty.
# 13  
Old 11-24-2014
When you download a web page you get an *.html file, not *.png. You would have to display the *.html in a browser to see it as an image, and then take a screenshot of that image...

...unless you know of or can write an application that converts *.html to *.png?
Like this one maybe...
How to convert an HTML web page to PNG image on Linux - Xmodulo

Usage: CutyCapt --url=http://www.example.org/ --out=localfile.png

Last edited by ongoto; 11-24-2014 at 02:55 PM.. Reason: added link
# 14  
Old 11-24-2014
Also the other one:

bash-3.2$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.10 (Tikanga)
This User Gave Thanks to ankur328 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need command to capture word from shell script and send email

Hello Experts, Greeting to all of you. I have a requirement, that we have a shell script status.sh that check the status of server and server status shows as status.sh Enterprise Server - Running Admin Server - Shutdown Requirement is like whenever the output shows shutdown it should... (2 Replies)
Discussion started by: aks_1902
2 Replies

2. Shell Programming and Scripting

Capture run time of python script executed inside shell script

I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Discussion started by: Adfire
2 Replies

3. Shell Programming and Scripting

How to capture the exit code of a shell script in a perl script.?

hi, i want to pop up an alert box using perl script. my requirement is. i am using a html page which calls a perl script. this perl script calls a shell script.. after the shell script ends its execution, i am using exit 0 to terminate the shell script successfully and exit 1 to terminate the... (3 Replies)
Discussion started by: Little
3 Replies

4. Shell Programming and Scripting

Shell or Perl Loop Screenshot URLs

I am trying to capture screenshots from a huge list of URLs. I am able to manually capture images of individual pages; that is, I simply run the following command to get a screenshot of Foo.com $ python /path/to/screencapture.sh http://www.foo.com I want to modify the script so that instead of... (2 Replies)
Discussion started by: chipperuga
2 Replies

5. Shell Programming and Scripting

Shell script to capture ORA errors from Alert Log

Hi, as the title says, I am after a simple script, which will open the Alert log from an 11.2.0.1 Linux environment and mail the error message and description to a recipient email address. I can then schedule this job via cron and let it run every 15 minutes. I have searched online... (16 Replies)
Discussion started by: jnrpeardba
16 Replies

6. Shell Programming and Scripting

Capture makefile errors in shell script

Hi, I have a bash script which calls a few "make". I would like to know whether the makefile failed with any errors. How do I do that in the script? Thanks, S (2 Replies)
Discussion started by: suryaemlinux
2 Replies

7. Shell Programming and Scripting

Capture unexpected exit in shell script

Hi, I have shell script that checks processes forever. But somehow it is killed and I want to know what causes it. while do check the processes if they are running, if not restart them done I want to capture the output when the script is terminated, how can I do that? /Andreas (2 Replies)
Discussion started by: mr_andrew
2 Replies

8. Programming

C coding for Screenshot capture

Hey guys, I'm for C code that can do screen capture for me. Any help. Thanks. (8 Replies)
Discussion started by: rakesh_01
8 Replies

9. Shell Programming and Scripting

Capture Shell Script Output To A File

Hi, I am running a shell script called dbProcess.sh which performs shutdown and startup of various Oracle instances we have.At the time of execution the script produces the following output to the command line window $./dbProcess.sh stop #### Run Details ###### Hostname : server-hop-1... (4 Replies)
Discussion started by: rajan_san
4 Replies

10. Shell Programming and Scripting

Capture Oracle return code in shell script

I am using the following code in my shell script list=`sqlplus -s $user/$pwd@$dbms<<EOF WHENEVER SQLERROR EXIT SQL.SQLCODE set pagesize 0 feedback off verify off heading off echo off select * from control_tbl where src_nm=$3 and extrct_nm=$4; exit SQL.SQLCODE; EOF` ERROR=$?... (1 Reply)
Discussion started by: Vikas Sood
1 Replies
Login or Register to Ask a Question