10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: hermouche
9 Replies
2. Shell Programming and Scripting
I have ssh password less auth enable & script does the job well as well
#/bin/bash
for i in `cat ip`
do
scp /etc/resolv.conf root@$ip
done
But I need to take backup of the file i will overwrite .. is there any simple way ?
Kindly respond (5 Replies)
Discussion started by: heman96
5 Replies
3. Shell Programming and Scripting
HI,
I have a file serverlist in that all host names are placed.
i have written a small script
#./testping
#! /bin/bash
for i in `cat serverlist`
do
ping $i >> output.txt
done
so now it creates a file output.txt till here fine..
now each time i run this script the output file... (4 Replies)
Discussion started by: madhudeva
4 Replies
4. Shell Programming and Scripting
So I'm new to this sed command and I am trying to create a script that replaces ip addresses when I name a file but can't tweak it to work.
Here is what it looks like:
#!/bin/bash
#
file=$1
#
sed -e 's/-CPUaddr 10.30.10.166/-CPUaddr 10.30.10.151/g' -i "$file"
sed -e 's/-CPUaddr... (10 Replies)
Discussion started by: uradunce
10 Replies
5. UNIX for Advanced & Expert Users
Hello,
I want to create a shell script that would check the file "/etc/default/kbd" for the entry KEYBOARD_ABORT=alternate on a list of SUN Solaris servers.
If this entry is not uncommented (without #) then I should get a message/error report for the host which does not have the setting... (3 Replies)
Discussion started by: mahive
3 Replies
6. Shell Programming and Scripting
I am trying to write a script that checks whether or not, a file exists on multiple servers.
My code / logic so far is:
#!/usr/bin/ksh
print "Enter File name to be checked"
read MYFILE
ssh server1 "
cd /var/opt/logs ;
if
then
... (4 Replies)
Discussion started by: momin
4 Replies
7. Shell Programming and Scripting
Hi All,
I am a total noob to the Unix world, and i hope to learn a lot from this wonderful community. Here's my first post and question , i am trying to SCP a file to multiple servers (multiple destinations) through this little script :
#!/bin/ksh
# copy files
# File to be copied... (7 Replies)
Discussion started by: rdlover
7 Replies
8. Shell Programming and Scripting
All, I need to write an unix shell script which inserts some records into a file located in remote servers.
* Get the input from the user and insert according the first row. It should be in ascending order.
123451,XA,ABA
123452,XB,ABB
123453,XC,ABC
123455,XE,ABE
123456,XF,ABF
123458,XG,ABG... (2 Replies)
Discussion started by: techychap
2 Replies
9. Shell Programming and Scripting
i have serverA and serverB and i have a folder with same name an location in both servers.... Now i want to compare files in folder(serverA) with folder (serverB) if there are files missing in folderB then copy those files from folder(serverA) to folder(serverB) (1 Reply)
Discussion started by: ashahzad
1 Replies
10. AIX
I would like to ping a list of servers in a text file. Can anyone help? (1 Reply)
Discussion started by: gbarkhor
1 Replies