unix script for repeating a command with a variable


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users unix script for repeating a command with a variable
# 1  
Old 07-26-2007
unix script for repeating a command with a variable

Hi need urgent help , for creating unix script .
To collect system name,This is command i want to execute n (integer) no. of times for for a differnt IP addresses .IP is variable in every execution.
Other string & collecter name is constant .
snmpGet %IP% sysName.0 -c <string> -S <datacollecter name>

Please help in this . thanks a lot.


rgds
LT
langdatyagi
# 2  
Old 07-26-2007
You are breaking the rule with duplicating post:
https://www.unix.com/unix-for-dummies...ript-help.html
# 3  
Old 07-26-2007
langdatyagi, be aware of the rules.

You have already broken it twice. Once more and you will earn a temporary ban.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need help with repeating variables in a shell script

I should preface this by saying I have never worked with shell scripts before so this is all new to me. I was able to make something that worked, but is terribly optimized, and I have no idea how to improve it. If anything it's a pretty hilarious script: #/bin/bash get_char() { ... (4 Replies)
Discussion started by: ricco19
4 Replies

2. Shell Programming and Scripting

awk and or sed command to sum the value in repeating tags in a XML

I have a XML in which <Amt Ccy="EUR">3.1</Amt> tag repeats. This is under another tag <Main>. I need to sum all the values of <Amt Ccy=""> (Ccy may vary) coming under <Main> using awk and or sed command. can some help? Sample looks like below <root> <Main> ... (6 Replies)
Discussion started by: bk_12345
6 Replies

3. Shell Programming and Scripting

SH script, variable built command fails, but works at command line

I am working with a sh script on a solaris 9 zone (sol 10 host) that grabs information to build the configuration command line. the variables Build64, SSLopt, CONFIGopt, and CC are populated in the script. the script includes CC=`which gcc` CONFIGopt=' --prefix=/ --exec-prefix=/usr... (8 Replies)
Discussion started by: oly_r
8 Replies

4. UNIX for Dummies Questions & Answers

Using sed command to remove multiple instances of repeating headers in one file?

Hi, I have catenated multiple output files (from a monte carlo run) into one big output file. Each individual file has it's own two line header. So when I catenate, there are multiple two line headers (of the same wording) within the big file. How do I use the sed command to search for the... (1 Reply)
Discussion started by: rebazon
1 Replies

5. Shell Programming and Scripting

repeating ftp script question

so i got this request to do this: - Script should check for the file ever 15 minutes on the FTP server…if the file is not found, then the whole script exits. File will only be created one a week at random. i have gotten this far, but am kind of stuck, also sleep command doesnt work... (3 Replies)
Discussion started by: zapatur23
3 Replies

6. Shell Programming and Scripting

Repeating Substitution Command on VI

Hello Folks, how to write a command on vi that allow to repeat last substitution command? Here what I want to do : 1 2 3 1 2 3 1 2 3 :.,+2s/\n/ /And I obtain : 1 2 3 1 2 3 1 (5 Replies)
Discussion started by: gogol_bordello
5 Replies

7. UNIX for Advanced & Expert Users

Repeat output of last command w/o repeating last command

Is there a way to repeat the output of the last command for filtering without running the command again? All I could think of was to copy all the data to a text file and process it that way, is there another way? Like say I want to grep server.server.lan from a dtrace that was pages long after I... (5 Replies)
Discussion started by: glev2005
5 Replies

8. Shell Programming and Scripting

Repeating awk command

Hi all, I have an awk command that needs to be ran multiple times in a script on one file containing lots of fields of data. The file look like this (the numbers are made up): 1234 2222 2223 2222 123 2223 3333 2323 3333 3321 3344 4444 The... (2 Replies)
Discussion started by: nistleloy
2 Replies

9. UNIX for Dummies Questions & Answers

repeating previous argument on command line?

Hi, is there a way in bash--or any other shell--to repeat the preceding argument on the command line? E.g., let's say I want to rename the file "/var/www/conf/httpd.conf" to "/var/www/conf/httpd.conf.bak". I want to be able to type mv /var/www/conf/httpd.conf, and then press a command key that... (6 Replies)
Discussion started by: hadarot
6 Replies

10. Shell Programming and Scripting

Repeating commands in a script

I have written a script that I want to be repeated. The script that I wrote outputs the date, how many people are on the system, how many people logged in before me, and how many people logged in after me. Than what I want it to do is after it outputs the 4 lines I want it to go back to the... (4 Replies)
Discussion started by: Dave2874
4 Replies
Login or Register to Ask a Question