Sponsored Content
Top Forums Shell Programming and Scripting Need help fix my script to get alerts when the command produce n expected output Post 302946611 by RudiC on Wednesday 10th of June 2015 05:14:40 PM
Old 06-10-2015
If I - having no clue of curl - interpret your post correctly, what you call "expected output" is what curl writes to stdout after downloading it successfully from the server. So its exit code will always be 0.
You might want to analyse curl's stdout for a decision "other than success".

Last edited by RudiC; 06-10-2015 at 06:23 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl Script to produce a file

hi i got a file called essay which contain few pages with many paragraphs. now i wanna with PERL to produce another file which called Essaylist that contain a sorted list of words that appear in the file essay. the format for Essaylist: $word found $times times on page a b c.... where $word... (3 Replies)
Discussion started by: mingming88
3 Replies

2. Shell Programming and Scripting

Caller Script should produce and email from 4 different script within it

Hi I wrote a shell script , which includes one output file which is emailed back to me , when the script runs . Now i want to slip the script into 4 different shell scripts each of which taking the parameter PROD or DEV, and include all the 4 different shell scripts in a caller script. ... (3 Replies)
Discussion started by: rxg
3 Replies

3. Shell Programming and Scripting

get file content and produce command

hi buddies; ip.txt: 192.168.1.1 192.168.1.2 192.168.1.3 192.168.1.4 192.168.1.5 ... parameters.txt: portvalue username password session ... (2 Replies)
Discussion started by: gc_sw
2 Replies

4. Red Hat

how to produce date command o/p

Hello I am trying of a solution to produce date cmnd o/p as: Feb 18 is the 049 day of the year. Any ideas how to produce this? (2 Replies)
Discussion started by: ranumala
2 Replies

5. Shell Programming and Scripting

Not getting expected output

Hi I have written below script to get the data in table form. #!/bin/sh echo "File Name\tType" for i in *; do echo "$i\t\c" if ; then echo "directory" elif ; then echo "symbolic link" elif ; then echo "file" else echo "unknown" fi donehowever i am getting output in different way... (3 Replies)
Discussion started by: scriptor
3 Replies

6. Shell Programming and Scripting

How to produce a executable Oracle script from bash script?

Hi here's my code ${ORACLE_HOME}/bin/sqlplus /nolog <<!EOF --step 5 create db script start set feedback off set heading off set echo off conn / as sysdba spool ${ORACLE_SID}_db_link.sql SELECT 'CREATE '||DECODE(U.NAME,'PUBLIC','public ')||'DATABASE LINK '||CHR(10)... (2 Replies)
Discussion started by: jediwannabe
2 Replies

7. Shell Programming and Scripting

Join two files combining multiple columns and produce mix and match output

I would like to join two files when two columns in each file matches with each other and then produce an output when taking multiple columns. Like I have file A 1234,ABCD,23,JOHN,NJ,USA 2345,ABCD,24,SAM,NY,USA 5678,GHIJ,24,TOM,NY,USA 5678,WXYZ,27,MAT,NJ,USA and file B ... (2 Replies)
Discussion started by: mady135
2 Replies

8. Infrastructure Monitoring

Autosys - cleaning alerts thru command line

Hello- I am currently researching on an autosys command that can be invoked via command line that can clean-up alerts. The reason I ask is because we have jobs that activate on a daily basis. The job polls whether it needs to run or not (via filewatcher or some database check). If the job isn't... (0 Replies)
Discussion started by: cec_can
0 Replies

9. Shell Programming and Scripting

Bash script unable to disable expected output

I'm trying to understand why a script behaves different when run through a pipe. My OS: Linux myip 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:42:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux This script (myscript.sh): #!/bin/bash echo whoami: whoami echo who: who echo who... (2 Replies)
Discussion started by: SkySmart
2 Replies

10. Shell Programming and Scripting

Gawk --- produce the output in pattern space instead of END space

hi, I'm trying to calculate IP addresses and their respective calls to our apache Server. The standard format of the input is HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST... (2 Replies)
Discussion started by: busyboy
2 Replies
CURLINFO_HTTP_VERSION(3)				     curl_easy_getinfo options					  CURLINFO_HTTP_VERSION(3)

NAME
CURLINFO_HTTP_VERSION - get the http version used in the connection SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HTTP_VERSION, long *p); DESCRIPTION
Pass a pointer to a long to receive the version used in the last http connection. The returned value will be CURL_HTTP_VERSION_1_0, CURL_HTTP_VERSION_1_1, or CURL_HTTP_VERSION_2_0, or 0 if the version can't be determined. PROTOCOLS
HTTP EXAMPLE
CURL *curl = curl_easy_init(); if(curl) { CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); res = curl_easy_perform(curl); if(res == CURLE_OK) { long http_version; curl_easy_getinfo(curl, CURLINFO_HTTP_VERSION, &http_version); } curl_easy_cleanup(curl); } AVAILABILITY
Added in 7.50.0 RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
CURLINFO_RESPONSE_CODE(3), curl_easy_getinfo(3), curl_easy_setopt(3), libcurl 7.54.0 May 11, 2016 CURLINFO_HTTP_VERSION(3)
All times are GMT -4. The time now is 07:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy