10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I am trying to call a shell script in a loop. I want my first instance to complete, and then the 2nd instance of the command to start - and so on.
eg. I am running this script 30 times. The wrapper script needs business date, from_time,to_time & server_name as inputs.
script_name... (2 Replies)
Discussion started by: neil.k
2 Replies
2. Shell Programming and Scripting
spawn fbat
expect ">>"
send "log fbatPW80_OR8sim1 \r"
expect ">>"
send "load map.map \r"
expect ">>"
send "load fbatPW80_OR8sim1.ped \r"
expect ">>"
send "fbat -v1 \r"
expect ">>"
send "log off \r"
expect ">>"
I need the above code to run in a loop such that script keeps doing a... (1 Reply)
Discussion started by: zoeli
1 Replies
3. Shell Programming and Scripting
Oracle Linux 6.4/Bash shell
I have six files as shown below. Using ls/grep (or anything) , I need to list all files which start with the pattern stomper but not the ones
which ends with 1.
$ touch stompera
$ touch stomperb
$ touch stomperc
$ touch stompera1
$ touch stomperb1
$ touch... (7 Replies)
Discussion started by: kraljic
7 Replies
4. Shell Programming and Scripting
I have a text file that has multiple lines in it with multiple dates and years. I was trying to figure out the best way to remove the line that had 2010 and 2011 to an archive file. We only need to keep the 2012 and 2013 lines in the original file. The following is a sample line in the txt file:... (2 Replies)
Discussion started by: smkremer
2 Replies
5. UNIX for Dummies Questions & Answers
Hi
I would like to ssh into serveral servers, print the hostname and do an ls (of files in a certain directory), and add these details to a file.
so i have this:
#!/usr/bin/bash
for host in hostnames_here
do
ssh $host echo "$HOSTNAME" ls /directory_location > ~/new_file_name.txt
... (6 Replies)
Discussion started by: horhif
6 Replies
6. Shell Programming and Scripting
#!/usr/bin/expect
spawn telnet 1.1.1.1
expect login*
send “admin\r”
expect Password*
send “abcdef123\r”
expect “Router#”
send “exit\r”
I want the above code to run in a loop such that script keeps doing a telnet to the device. Please suggest
Tarun (1 Reply)
Discussion started by: tkhanna82
1 Replies
7. UNIX for Dummies Questions & Answers
I need your's help to display user with greep command form /etc/passwd
1. to display all login to begin and finishing with letter a or b
etc.users
admina
bserb
broota
2. beginning and finishing with the same sign
etc. users
aghata:....
roootr:....3. to contain what the least three... (1 Reply)
Discussion started by: ViruS89
1 Replies
8. Shell Programming and Scripting
cat vfiler_volumes.list | while read var1 var2 ; do ssh -n "$var1" df -h "$var2" >> test
this part works, however i would like to add an echo $var1 >> test before each ssh iteration.
any pointers ?
thanx (1 Reply)
Discussion started by: riegersteve
1 Replies
9. Shell Programming and Scripting
HI.
I am trying to run 2 commands, using the "for x in a b c d" loop but i am having a hard time coding it...
Here is what i have so far:
for SERVER in SERVERA SERVERB SERVERC SERVERD SERVERE
do
###############################################################################
#... (5 Replies)
Discussion started by: Stephan
5 Replies
10. Shell Programming and Scripting
Hi,
please can someone point me in the right direction with a shell scripting problem.
I want to execute a command in a for loop and the command should be started not one-by-one meaning the for loop is waiting for the exit code , it should be started in parallel.
I have a plain text file... (3 Replies)
Discussion started by: networkfre@k
3 Replies