Repeating variables in the code


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Repeating variables in the code
# 1  
Old 02-08-2007
Repeating variables in the code

Hi all,
I had written 3 KSH scripts for different functionalities. In all these 3 files there are some 30 variables in common. So I want to reduce the code by placing these variables in a common properties file named (dataload.prop/dataload.parms/dataload.txt) or txt file and access it in the 3 programs from one program.

Please do tell me how to call that properties file from a ksh program.

Thanks
# 2  
Old 02-08-2007
Code:
. /path/to/your/file/dataload.txt

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Adding variables to repeating strings

Hello, I want to add a letter to the end of a string if it repeats in a column. so if I have a file like this: DOG001 DOG0023 DOG004 DOG001 DOG0023 DOG001 the output should look like this: DOG001-a DOG0023-a DOG004 DOG001-b (15 Replies)
Discussion started by: verse123
15 Replies

2. 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

3. Shell Programming and Scripting

auto-generating assembly code by variables found by script

Hi everybody I'm working on a list of registers(flip-flops to be exact), now i need to extract some value from this list and use them as arguments to pass them to some assembly code for example i have: 118 chain79 MASTER (FF-LE) FFFF 1975829 /TCK F FD1TQHVTT1 ... (1 Reply)
Discussion started by: Behrouzx77
1 Replies

4. Homework & Coursework Questions

repeating test several times

echo "Enter Number of times u want this to be run" read RUN for i in {1..$RUN} do echo "i am going to market" done now the issue is that when i run this script it ask me "Enter Number of times u want this to be run" and then i put the value ,say i put 10, but when the script runs it gives... (1 Reply)
Discussion started by: bharat8007
1 Replies

5. Shell Programming and Scripting

Repeating loop between dates

Hi , I need to execute set of commands between two parameterized dates. Suppose, If parameter1 is Feb1st-2010 and parameter2 is November15th-2010. I need to execute a set of commands within these dates . can any one help me to build a loop so that it should execute for 28days in February... (4 Replies)
Discussion started by: Raamc
4 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. Shell Programming and Scripting

Value repeating problem in columns

Hi, I have a file like this 0817 0201364 1 866 . . . . . . . 574 . 100.0 100.0 5529737 1 TV 0817 0201364 2 1440 . . . . . . . . . . . 5529737 1 TV 0817 0201364 6 1323 . . . . ... (2 Replies)
Discussion started by: Sandeep_Malik
2 Replies

8. Programming

including shell env variables into C code

Hey, I'm brushing up on C code and I'm trying to incorporate the shell environmental variables into standard ansi C code. For example I just want to do the equivalent of --echo $PATH-- and implement that in standard ansi C code. How would I do that? Thanks (4 Replies)
Discussion started by: bdsffl
4 Replies

9. 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

10. UNIX for Dummies Questions & Answers

Omit repeating lines

Can someone help me with the following 2 objectives? 1) The following command is just an example. It gets a list of all print jobs. From there I am trying to extract the printer name. It works with the following command: lpstat -W "completed" -o | awk -F- '{ print $1}' Problem is, I want... (6 Replies)
Discussion started by: TheCrunge
6 Replies
Login or Register to Ask a Question