03-07-2006
script to write script
i have scripts files to create mq objects. When I have to do that in another machine, I have to copy all of them and change a few parameters from some of the files. I think, if I create a script file which takes me these parameters as input ( not sure whether we can give a file as an input of type when run only) and have all the scripts creates different scrpts file, that would be very helpful. what i mean is
say i have a script file called FF.
aaaa xxx
bbb yyy
what i want to do is
echo "aaaa xxx" >FF
echo "bbb yyy">>FF
Also want to replace if the xxx is variable. some of the parameters are fixed some of them are variable.
there are about 10 scripts file. So, I like to read one by one and create file which i can copy and use in new machine.
Can some one help me how i can do that
thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Folks!
I am a MacUser and am trying to learn Unix for the last few months.
I will explain in detail what I am trying to do, and apreciate you help if you can teach me even if it is a single comand line inside the script.
I own a small company, where I manufacture special gypsums and... (5 Replies)
Discussion started by: fundidor
5 Replies
2. Shell Programming and Scripting
Actually i am working with two diffrent files having same structure
each file contain Ten diffrent column and i want to write a script
which will compare the colummns of first file with the column of second file and diiference will be send to the first column of third file .
similarly for... (5 Replies)
Discussion started by: gyana_cboy
5 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I have done some BASIC shell scripting/PERL scripting before so I am familiar with the languages. I am not really sure which one would lend itself better to the application I have to write.
I am required to scan the message logs for possible break in attempts. If I use shell scripting... (2 Replies)
Discussion started by: mojoman
2 Replies
4. Shell Programming and Scripting
Hi All,
I have written the following script. I have just repeated some commands, and I am sure there is a more better way to do it. I hope I one of gurus here will help me make it in a better shape. Here is the script:
#! /bin/sh
sed -i -e "s/test2.xxx/test3.xxx/" -e "s/output2/output3/"... (2 Replies)
Discussion started by: faizlo
2 Replies
5. AIX
If I need delete some disk,
for i in hdisk1 hdisk2 hdisk3 hdisk4
do
rmdev -dl $i
done
if I have more than 100 hdisks, how to write a script like that to delete them? (6 Replies)
Discussion started by: rainbow_bean
6 Replies
6. Shell Programming and Scripting
Hi All,
I have written the follwing script to take the backup of the file every day
along with the date.
DATE=`date +%Y%m%d`
export DATE
cp var/hr/hr333m.txt cp var/hr/payments/hr333m_$DATE.txt
The file name as follows after taking the backup.
hr333m_20110630.txt
Could you... (3 Replies)
Discussion started by: ajaykumarkona
3 Replies
7. Shell Programming and Scripting
I am having a File format as mentioned below
Employee id|Name|Languages
12345|Hema|02|English|Hindi
4567|Basha|03|Engligh|Hindi|Telegu
the 02 and 03 are counters. Using that we need to generate the output records as mentioned below
12345|Hema|English
12345|Hema|Hindi
... (8 Replies)
Discussion started by: bashamsc
8 Replies
8. UNIX for Dummies Questions & Answers
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
9. Shell Programming and Scripting
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
10. UNIX for Beginners Questions & Answers
Hi All, need one help
Suppose there are two files-
1)Input files-:
path1/given/to/file | File1
path2/given/to/file | file 2
etc
Note- I use "|" as variable separator.
2) Target files-
I want to fetch data from file1 and use in below command-:
cd /path(from 1st file)
ls -ltr
If file(From... (2 Replies)
Discussion started by: Shubham
2 Replies