Writing a script to get both URL and IP information
hi guys- im trying to write a script to get both url and ip information. i think i can get it to work if i hardcode the url into the script, however what I rather have happen is the script ask the user to input a url. ive searched through the wget man and cant find anything there. i know this must be an easy fix, can anyone help?
ill try to break out what i think should happen
#!/bin/bash
wget (dont want to hardcode the url here, i want a prompt to go to user for url)
save url data to a file
read url from file to obtain ip address
i would like to use this so i can easily download a webpage and get its ip in one step
any help would be greatly appreciated
Last edited by doggydog2002; 02-04-2010 at 06:36 AM..
ill try this code out and see if it works for me.. thanks a lot for the code.
would anyone be able to detail exactly what each line is doing for me in easy to understand terms? i know what read, wget, and those things mean by definition, but knowing what they mean in real terms would help a lot.
Hello,
I have a small script and it runs from web application in below format:
pipe:///path_to_myscript.sh url1 url2 url3
myscript.sh:
#!/bin/bash
count=0
while
do
count=$((count+1))
exec 3>&1
((ffmpeg -i $1 ...... -f mpegts pipe:1 2>/dev/null 1>&3 ) 2>&1 | \
while read LINE; do echo... (9 Replies)
Hello,
Am very new to perl , please help me here !!
I need help in reading a URL from command line using PERL:: Mechanize and needs all the contents from the URL to get into a file.
below is the script which i have written so far ,
#!/usr/bin/perl
use LWP::UserAgent;
use... (2 Replies)
Here is what I have so far:
find . -name "*php*" -or -name "*htm*" | xargs grep -i iframe | awk -F'"' '/<iframe*/{gsub(/.\*iframe>/,"\"");print $2}'
Here is an example content of a PHP or HTM(HTML) file:
<iframe src="http://ADDRESS_1/?click=5BBB08\" width=1 height=1... (18 Replies)
Hi
I am trying to extract information out of a file but keep getting grep cant open errors
the code is below:
#bash
#extract orders with blank address details
#
# obtain the current date
# set today to the current date ccyymmdd format
today=`date +%c%m%d | cut -c24-31`
echo... (8 Replies)
I am trying to find a way to test some code, but I need to rewrite a specific URL only from a specific HTTP_HOST
The call goes out to
http://SUB.DOMAIN.COM/showAssignment/7bde10b45efdd7a97629ef2fe01f7303/jsmodule/Nevow.Athena
The ID in the middle is always random due to the cookie.
I... (5 Replies)
Hi,
I am faced with a problem. Is it possible to access a URL from Unix script and to check whether it is up and running?
I could find some perl scripts that can do the same , but could not get any info if we can achieve it with UNix.
Any help will be very useful.
Thanks in advance. (1 Reply)