Write a small shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Write a small shell script
# 8  
Old 10-13-2010
Merged the two threads - seems to me the same... (Bumping is not allowed!!!)
# 9  
Old 10-14-2010
Thanks for quick replies.

Thanks again,

now with above commands i can find the hardcode IP_ADD in all the directories.now i have to write a condition like this.
iam writing alogorithm:

If [IP_add == found]
copy int ip_add.txt file under the path /abc/gcst
read domain names from command prompt.
assign to respective Ip_add in the ip_add.txt
while[ IP_add == found] in the below paths
[ /abc/gcst/xyz or /amex/gcst/kgh or /amex/gcst/rtc]
replace with domain name from the ip_add.txt file.

please help me to write a script for the above alogorithm.iam looking forward from you.Smilie

Thanks & Regards
rajkuma g

Last edited by rajkumar_g; 10-14-2010 at 04:37 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to write config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

2. UNIX for Dummies Questions & Answers

How to write Config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

3. UNIX for Dummies Questions & Answers

help needed with a small shell script!

I have a scenario where i need to look for files of these kind filename.log.0 filename.log.1 if the files are present, then no action is to be taken, if not found, then it shud create/touch files with the same name. so can anyone help constructing the script for me..appreciate ur help. ... (5 Replies)
Discussion started by: win4luv
5 Replies

4. UNIX and Linux Applications

Need small help to write the code in unix

Hi all, I get data-files which has a particular identified on the 1st record( header ), based on which I've to load a constant for the 1st column of every row. How do I set in the control file using unix shell script. Appreciate if someone can give me some directions on this. Thanks in... (3 Replies)
Discussion started by: lkeswar
3 Replies

5. Shell Programming and Scripting

Need to Write Shell Script based off of this shell command

I'm trying to read a bunch of log files and output the lines that contain particular strings. To accomplish this, I've been running the following from the command line: find . -name "*" | xargs grep " " | grep " " > output.txt Two grep statements are needed in case I'm looking for a... (3 Replies)
Discussion started by: Rally_Point
3 Replies

6. Shell Programming and Scripting

Please help to debug a small shell script (maybe AWK problem)?

Hi Buddies, The following is shell scripts which was borrowed from linux box for load average check. it runs good. (this structure is simple, when load average is too high, it will send alert to user) #!/usr/bin/ksh # Set threshold for 1, 5 and 15 minture load avarage # configured for... (4 Replies)
Discussion started by: GreatJerry
4 Replies

7. Shell Programming and Scripting

Small shell script help required

Hi Guys, Please can some one explain me the below part of code. In this code what is the use of the line in Bold. COPY=0 if ; then echo "$CONF exists and is non-empty - backing it up" SUFFIX=`date +%Y%m%d%H%M%S` echo "cp -p $CONF $CONF.$SUFFIX" cp -p $CONF... (4 Replies)
Discussion started by: max29583
4 Replies

8. Shell Programming and Scripting

Very small Shell Script Help...

The following Script takes each extension and determine what category it belongs and then moves it into a directory based on the extension. (for eg. 1.sh, 5.sh, 9.sh together; 4.csh, 120.csh, 6.csh together and 7.ksh, 2.ksh, 59.ksh together) and moves them to their respective directories viz.... (2 Replies)
Discussion started by: marconi
2 Replies

9. Shell Programming and Scripting

what is problem with this small shell script.. case statement related

Hi All, this small script is written to recognize user input character.. it is in small case .. upeer case or is a number... but when i input first capital letter say A.. it always gives small character.... what is the problem. #!/bin/bash echo "Enter the character" read a case $a in )... (2 Replies)
Discussion started by: johnray31
2 Replies

10. Shell Programming and Scripting

small script - get sql output & write into txt

Hi, how can I write a small script to run the following statement and output the result into check_result.txt select /*+RULE*/ tapname from typetbl where tapname like 'AA%' and rejectcode=9; Normally, I just type sql and get into SQL> (2 Replies)
Discussion started by: happyv
2 Replies
Login or Register to Ask a Question