General :: Capturing URL Response Using Command

Aug 6, 2010

I am capturing the response of three URLs which are in file named urls.txt using following command and write response in output.txt file.

####Code############
wget -i urls.txt -q -O - | tee output.txt
###########End of code
Now i am finding the case where url is not responding and that output is not available to me in the file and on console i am getting "Could not connect to host".

Now I want to modify my urls.txt to have two fields:
Name and URL
Example:
URL1 | http://10.0.0.2/xsc/abc
URL2 | http://10.0.0.1/lkj/csv
URL3 | http://10.0.0.5/sdf/plk

I want to execute each url and print there response against each name
Example:
URL1 : CONNECTED
URL2 : NOT CONNECTED
URL3 : NOT CONNECTED

View 2 Replies


ADVERTISEMENT

Ubuntu :: Capturing Command Output Response

Aug 5, 2011

I run a 3rd party command line utility and it works fine, but sometimes it says "Error blah blah blah... Connection timed out"

I want to script this utility, but I need to not execute the commands in the script if it gives me that connection timeout error.

bash code to capture that response from the utility? Something along the lines of:

Quote:

#!/bin/bash
3rdpartyutil > /tmp/temp.txt
if [ ! -f /tmp/temp.txt]; then
echo no error, run whatever you need to man
fi
rm /tmp/temp.txt

Unfortunately, that doesn't work because the utility outputs non-error information to the screen even when it is successful, so it always outputs something, I never need to see it, but I do need to be able to act upon if some of that text says "error" or "connection timed out"

View 3 Replies View Related

General :: Capturing Output Of Command In Vim Editor?

Sep 28, 2010

I have a file which contains a table

row1 ✔ no ✔ no
row2 no ✔ ✔ no
... so on

I want to prefix the number of ✔ to corresponding row If I use the command :.s/✔//gn I get output written like '2 matches on 1 line' How can I extract the '2 matches' in above case ?

View 11 Replies View Related

General :: Provide Response To Command Output ?

May 4, 2011

I am writing a bash shell script on RHEL. I need a way to analyze the output from a command, and provide a response to that command depending on what is found.

On the command line this looks like:

In other words I want to script this - capture the output from the mlsmailbox --delete command, respond with a yes if the mailbox was found, and go on if it was not found. There may be other responses to the mlsmailbox --delete command that I need to analyze and respond to as well.

View 3 Replies View Related

General :: Pass Response As Command Parameter?

Mar 10, 2010

I have a backup schedule running a full backup everyday. I'm using webmin to manage these backup now. The problem is when the dump command sends a prompt asking if we want to rewrite the tape, Webmin does not display this prompt and we end up having to terminate the backup -> erase the tape(which takes a long time) and then run the backup again.I was wondering if there is a technique that could be used to pass "Yes" as a parameter to the dump command, much like in windows? or if there is a more efficient way of getting this done.

View 2 Replies View Related

General :: Capturing From Line One Input?

Apr 23, 2011

On my first card of ALSA (alsamixer -c 0) I would need to record the Line only.

View 1 Replies View Related

General :: Capturing PID And Killing Process

Oct 9, 2010

I want to capture PID of a program and kill it using the PID if the program is been executing beyond 5 seconds.The problem I'm facing is I have another copy of the same program running under different shell script, and the above code is killing both the process. How do I specifically kill the program which has started under the current running shell script.

View 2 Replies View Related

Server :: Apache Response "HTTP Request Sent; Waiting For Response" Too Long

Jul 19, 2011

when I try to access any page even small html pages it stays like 3 seconds in HTTP request sent; waiting for response. state..even when I use Lynx locally on the server..bypassing any possible network issues..logs dont show a thing..the server itself is a high end server with nothing running on it apart from apache which is not serving anny clients now, firewall is disabled and hostnamelookups are set to OFF.

View 1 Replies View Related

General :: Capturing Remote Output Locally In Mac Terminal?

Jun 2, 2011

I want local programmatic access to ssh output in Mac Terminal. First, I tried redirecting the output of each command to a file. The file was perfect, but of course it was on the remote server, and an sftp for each command output seemed a little.. Next, I tried to Applescript Terminal, but it only gives access to the currently visible text in a tab (i.e. if half the output has already scrolled out of sight, it doesn't get returned - useless).

Last, I tried piping ssh to tee (e.g. ssh user@host | tee output.txt). This almost worked. I have the output in a local file, but there are a lot of unwanted characters mixed in. For example, every time I hit backspace, there's a ^H in the file. There's also text like "[0m[K" which is harder to get rid of.

View 2 Replies View Related

General :: Capturing And Parsing Xterm Cut Buffer In EMacs

Jan 17, 2010

I'd like to make an indirect control for Emacs (in Ubuntu Linux) so that I can swipe some text in an xterm with the cursor, cutting it into the X cut buffer, then run a macro in Emacs to parse the cut buffer text to look for text saying "line XXXX" where X is all digits, then go to that line in the current Emacs buffer. I think this is possible by using emacsclient to get emacs to run a macro, then the macro parsing the cut buffer, then issuing a goto-line command to the number that's been parsed. My problem is I don't know how to write the emacs script to read the X cut buffer and parse it.. I've been going through cookbook examples but none seem to fit.

My goal is to ease development. When I have an error/information/status message printed in an xterm, I want to swipe the error message which says something like "syntax error on line 2776" then press a keyboard shortcut which Ubuntu will interpret to launch emacsclient, which causes my already-open Emacs to grab that text, parse it, and go to the line number I just swiped. Only this last step of parsing is the hard part. (Yes, I know you can run a shell INSIDE of emacs, but this is doesn't fit my workflow). How would I make emacs look at that X cut buffer and parse out the line number and issue the "goto-line" command to the current buffer?

View 2 Replies View Related

General :: Video Capturing Program To Record Computer Screen

Jul 10, 2011

I'm just wondering if there is a video capturing program that can, at the least record what is on my computer screen (including what is on Wine) and at the most capture what is on my webcam as well.

View 2 Replies View Related

General :: Minicom Shows Offline And Is Not Capturing The Serial Data Being Sent?

Jan 5, 2011

Minicom was running fine two days ago capturing data from a gage device via a serial cable. Yesterday, users of the data started complaining that they were not receiving any data.

The minicom status line reads offline. Is this part of the problem or is this normal (I never really noticed it before.) All settings on the gage device match the minicom settings.

View 3 Replies View Related

General :: Get Immediate Response Whenever Connect The USB

Sep 11, 2010

I am using RHEL5. I did not get any response from my system whenever I connect the USB storage device. How could I get immediate response whenever I connect the USB.

View 1 Replies View Related

General :: 2nd Openvpn No Response

Jul 31, 2010

I am trying to start a 2nd openvpn service on my server so that clients can connect via udp instead of tcp.However when I run: openvpn /etc/openvpn/openvpn2.conf

I get no response at all.Usually I would expect the startup parameters or at least an error but I get nothing. I have to CTrl+c to get back to the prompt.ANy ideas what I can try?I changed the serve config so it has tun1 instead of tun and also changed the log files to openvpn-status2.log so it doesn't overwrite the other server.I also changed the network so there wouldn't be any IP conflicts. Openvpn1 runs on 172.16.x.x

View 5 Replies View Related

General :: Gnome Has No Response To Any Operation?

Nov 4, 2010

I run SUSE on my machine for a year, but I'm really a newbie on Linux. In the system monitor it states:SUSE LINUX Release 11.2 Kernel Linux 2.6.31.5 -0.1 -desktop GNOME 2.28.0Last week when I rebooted my machine, I suddenly found my machine had no response to any click or typing. When the cursor move to any icons, they can be highlighted, but when I click them, no response at all. The weird thing is almost every time after I reboot the computer, it can work for a few minutes, then stop working. But if I press Ctrl+Alt+Backspace, it can be log out.

I think there must be something wrong with my GNOME, 'cause everything seems working fine when I login IceWM. recover the .config file in my home directory. But I don't have this file in my home directory.

View 4 Replies View Related

General :: Bind9 Status - No Response Message

Aug 3, 2010

I'm trying to figure out on why when I do a: service bind9 status This doesnt display anything in my command. Should be: Status of Bind9 server: bind9 is running. But this doesnt display at all.

View 8 Replies View Related

General :: Dual Boot Response Time

Nov 5, 2010

I have installed Ubuntu 10 alongside with Windows XP. Consequently I need to make a choice at boot time. However, I feel that the system is not waiting very long, maybe 5 seconds or so, before going automatically into Ubuntu. Can that time be increased? If so, where or how?

View 1 Replies View Related

General :: Kubuntu Response Appears Only After Restarting?

Jan 1, 2011

I have Kubuntu 10.10. and it doesn't apply changes I did from terminal or any customization except after rebooting.

View 1 Replies View Related

General :: Fedora 14 On Dell Inspiron 2600 No Keyboard Or Trackpad Response

Feb 20, 2011

I am able to boot Fedora 14 to the GUI, log in on the keyboard, see the desktop, and then I get no response from the laptop's keyboard or trackpad.

I do not know how to obtain hardware specifics on my keyboard or touchpad, so perhaps that would be good info for me to start with...

BTW my ultimate goal is to run an Amahi server on the laptop. 2600 has a pentium III 1.13GHz processor and 512Mb RAM

View 3 Replies View Related

General :: Syslog Program - Send Email In Response To Messages Receives

Jun 22, 2010

I'm running a cobalt raq550 web server (Linux version 2.6) and I want to install a syslog program on it, something that could log messages and send me an instant email in response to certain messages it receives. Is there such a program?

View 6 Replies View Related

General :: Sed - Append Four Commas ',,,,' At The End Of Lines Containing The Pattern 'Response' In A Text File

Nov 5, 2010

Using sed, I am trying to append four commas ',,,,' at the end of lines containing the pattern 'Response' in a text file with lines such as these:

6,Pulse,50,254968,14886,NA,,,,
7,Picture,8,265157,0,1,15045,2,0,15000
7,Response,1,271553,6396,1
7,Pulse,50,274969,9812,NA,,,,
8,Picture,1,290232,0,1,15045,2,0,15000
8,Pulse,50,294969,4737,NA,,,,
[Code].....

View 1 Replies View Related

Software :: Capturing SCP Output With PHP?

Jul 20, 2011

I've made a simple php wrapper around scp. It works fine, but unlike when I run the scp command straight from the console, there is no output returned. I've tried using passthru(), exec(), system() and shell_exec(), all to no avail. I'm redirecting stderr to stdout already.

For example:
PHP Code:
<?php
$command = "scp -C -r $files $target 2>&1";
exec($command, $result);
print_r($result);
?>

Will scp the files correctly to the server, but doesn't print any output - $result is just an empty array. I'd like to see the output so I can visually confirm that the files have been transferred correctly.

View 1 Replies View Related

OpenSUSE :: KRDC Not Capturing Keys Using RDP

Jan 20, 2011

I can't seem to figure out the secret to send ctrl-alt-del to a remote Windows box using KRDC 4.4.4. Tried in windowed and full screen mode - no difference. Tried enabling "Grab All Possible Keys" in KRDC tool bar - nope. In all cases, ctrl-alt-del and alt-tab are sent to localhost. There are some mentions of a "config special keys dialog" for KDRC in a few places, though I don't actually find this anywhere in KRDC itself. Documentation for KRDC at the KDE site is very minimalistic. This should be super simple, but I can't quit seem to get it.

View 5 Replies View Related

Ubuntu :: 10.04 - Webcam Isn't Capturing Video?

May 4, 2010

Since I upgraded to 10.04 my Webcam (a logitech Quickcam Pro 4000) won't capture video.Ubuntu see it is there, but aMSN, Google Talk, Skype, and Cheese all give me nothing.

View 2 Replies View Related

Red Hat :: Capturing Start Up Messages In System Log

Jul 17, 2010

Is there any way to capture the "[OK]" or "[FAILED]" messages? I would like to know which daemons starts successfully and which ones fails. Any way to tell the system to save those messages in /var/log? I could do CTRL-Print Screen but I would rather not.

View 1 Replies View Related

Fedora :: Capturing Old Config Setting On New Install?

Aug 9, 2009

I never upgrade from one release to the other but rather do a completely new install. How can I keep my Gnome settings from the current release and somehow impose them after a new install. I am not sure which files/hidden files I should carry, save, possibly to a USB stick or whatever and a reasonable procedure to copy/impose them after the new install is stable.

View 5 Replies View Related

Ubuntu Multimedia :: Capturing Output With Luvcview?

Jan 7, 2010

According to 'man luvcview', if I do this:

Code:
luvcview -o testvid.avi

then luvcview should capture the video to the .avi file. However, when I try it, no output file is created. Grabbing a raw stream or raw frames works fine, but not the creation of AVI files. Am I missing something?

View 6 Replies View Related

Ubuntu Multimedia :: Capturing Sound Playing From Web?

Feb 17, 2010

I've tried to look up different programs for this but can't find anything. I'd like to be able to open my recorder on Myspace for instance and capture any sound playing through my speakers. I used to have a little program for this, but its windows based and won't seem to install correctly in Wine.

View 5 Replies View Related

Ubuntu :: Capturing ALL Output From Terminal To File?

Apr 17, 2010

I would like to capture all output spewed to a terminal session including processes that are terminated that were invoked from a script running in a terminal window. this is beyond capturing just stderr and stdout . for example

{
./script
} 2> stderr.cap 1>stdout.cap

if script is terminated (including because of memory violations) I get spewed output to the terminal I would like to capture that spewing to a file automatically or to a bit bucket /dev/null Is there another filehandle which can be redirected to do this? If so how or is there another way???

View 3 Replies View Related

Ubuntu :: Partitions And Screen Capturing Software

May 6, 2010

I have four primary partitions currently. I need to keep all of them. I need to make a fifth that is also a primary partition. Is there a way to somehow make a partition into a partition that's in an extended partition without losing any data? Maybe you know of another solution to my problem, but this is the only one I can conjure up. The second problem is much less severe. I can't find any screen capturing software for Ubuntu that will record my desktop and simultaneously record sound from a microphone.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved