I have written a one liner which looks in a configuration file for remote hosts to connect to. It then resolves them by first ping, and nslookup if it fails, then places the info in the hosts file.
The whole thing works, seemingly, apart from one slight issue. I would like to filter out remote hosts which are already specified as IP addresses, since it is obviously unnecessary to resolve them. I am learning sed slowly, but can anyone help achieve this?
Here is the script currently
I think that this following sed command is useful for placing after uniq or after the first cut command, however I believe it needs altered
Can anyone assist in this? Any help would be appreciated!
Hy over there,
Lets make it simple :)
Using a bash script, how to grep only the ip address and the mac address and put them in a file:.
for example from the dhcp.conf file we got such things:
The script will end up with two columns IP's and MAC adresses as it is showed below:
... (9 Replies)
Hello everyone,
I am a newbie on the world Shell Script. I just can build some scripts basically with the command which I used on the terminal. With the part algorithmic I don't have problem, but some functionality I can't and didn't know how around the situation.
I have the file .txt with... (5 Replies)
I am totally new to shell scripting. I want to see people from which domain access my website. I want to generate the domain names from IP addresses in the Apache access.log file.
There are around 54 log files. I concatenate all the files into one.
I am using Ubuntu 12.04 LTS.
So I... (4 Replies)
Hello
Is there an easy way to login to various ip's..one after the other. I need to login to about 30 aix boxes and put a file in each one...
Cheers (1 Reply)
Hello
Is there an easy way to login to various ip's..one after the other. I need to login to about 30 aix boxes and put a file in each one...
Cheers (1 Reply)
Dear Members,
Please help me to resolve below script. The script is used to send the attachment in the mail with all the details. However in one of the incidents, the attachment in the mail was blank. Now the client is after me to get it resolved ASAP. So prompt response would be highly... (2 Replies)
Hi all
i need to create a script that pings every server in my range (0-254) adn then returns the values to a file? can anyone please help. i am working in the tcsh ( and yes i know how to ping ) but i dont know how to ping them all in one script without copying and pasting a 254 times?
... (1 Reply)
I am using a bash script for CentOS 5.5, I found one and modified it, however I want to block the incoming IP addresses and ALLOW the IP addresses that are blocked to send out email.
I will use an internal network range for an example, 10.10.10.0/24 (if a lot of spam is incoming) from this range... (0 Replies)
Suppose i have a txt file that is the list of the addresses,something like:
lala0045 john james
lala0234 george james
and i want to send an email to lala0045@blabla.com and lala0234@blabla.com,the same domain...what is the exact syntax i should use in my script?
there is a command... (10 Replies)
I need a shell script for OS X, one that can find IP addresses of machines connected to my LAN, get the names of the computer associated with those addresses, then display them like so in a list: "Bob's L33T Boxx: #.#.#.#" Something like the network scanner in Apple Remote Desktop is what I'm... (1 Reply)