this is the simple script which i wrote to find the status of URL now i have doubt how i generate the log file, inside how can i give the option to store the output as file.
now the output like this
Quote:
2011-03-13_”00_50” google.com 200 okay
and this has to be store in a file (like log) and critical error code displayed means it automatically send mail to admin. with the error code.
I want to find out subdomains in the url using shell script.
e.g
narendra.eukhost.com
abc.domainname.co.uk
I want to extract narendra & abc from the above urls.
Please any one can suggest idea or script ? (2 Replies)
I'm trying to make a simple search script but cannot get it right. The script should search for keywords inside files. Then return the file paths in a variable. (Each file path separated with \n).
#!/bin/bash
SEARCHQUERY="searchword1 searchword2 searchword3";
for WORD in $SEARCHQUERY
do
... (6 Replies)
Hi,
I want to make a bash script which is running like :
1.sh http://www. google.com
and check if the url does exist printing a message.
I want to save the source code of this page in a file.
Could you help me ? (4 Replies)
I'm running a curl command in bash, but the & in the middle causes the second half of the line to run in the background, here's what I'm trying to do:
lat="37.451"
lon="-122.18"
url="http://ws.geonames.org/findNearestAddress?lat=$lat&lng=$lon"
curl -s "$url"
I tried escaping the & with \&,... (4 Replies)
#!/bin/bash
timevar=`date +%d-%m-%Y_%H.%M.%S` #-- > Storing Date and Time in a Variable
get_contents=`cat urls.txt` #-- > Getting content of website from file. Note the file should not contain any http:// as its already been taken care of
echo "Datae-time URL Status code Report" >... (2 Replies)
I'm really new to even doing a bash "hello world" script, so maybe someone would know how to do the following task, using bash scripting
Need to login using ssh from one dell server into another dell server, and obtain the raid battery status, using dell's open manage software commands; then... (5 Replies)
Hi All,
There is a shell script that captures Memory status in AIX 6.1 64 bits!
I need it to be validated by shell script experts for the following:
Shell Script:
cat memusageAIX.sh
#!/usr/bin/ksh
#
# Memory usage under AIX
#
USED=`svmon -G | head -2 | tail -1 | awk '{ print $3... (1 Reply)
Discussion started by: a1_win
1 Replies
LEARN ABOUT MOJAVE
curlopt_ignore_content_length
CURLOPT_IGNORE_CONTENT_LENGTH(3) curl_easy_setopt options CURLOPT_IGNORE_CONTENT_LENGTH(3)NAME
CURLOPT_IGNORE_CONTENT_LENGTH - ignore content length
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IGNORE_CONTENT_LENGTH,
long ignore);
DESCRIPTION
If ignore is set to 1L, ignore the Content-Length header in the HTTP response and ignore asking for or relying on it for FTP transfers.
This is useful for HTTP with Apache 1.x (and similar servers) which will report incorrect content length for files over 2 gigabytes. If
this option is used, curl will not be able to accurately report progress, and will simply stop the download when the server ends the con-
nection.
It is also useful with FTP when for example the file is growing while the transfer is in progress which otherwise will unconditionally
cause libcurl to report error.
Only use this option if strictly necessary.
DEFAULT
0
PROTOCOLS
HTTP
EXAMPLE
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* we know the server is silly, ignore content-length */
curl_easy_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, 1L);
curl_easy_perform(curl);
}
AVAILABILITY
Added in 7.14.1. Support for FTP added in 7.46.0.
RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
SEE ALSO CURLOPT_HTTP_VERSION(3), CURLOPT_MAXFILESIZE_LARGE(3),
libcurl 7.54.0 February 03, 2016 CURLOPT_IGNORE_CONTENT_LENGTH(3)