Reading a property file through shell script???
Hi!
i need a script that can read a property file. i.e., A script to read a "property" from property file. Read the property value and based on value of property, decide whether to start the some dataload activity or not. Its urngent. Can anyone help me out??? |
Hello,
This makes no sense to me whatsoever. What exactly are you trying to do here? And what property file are you talking about? Also, what is this "dataload activity" you are talking about? Cheers, Josh |
1 Attachment(s)
Hey! its kind database activity in IBM WCS.
There are java properties files which are having key and action related to that.(For example am attaching a property file,its like text file can open with notepad) Here is the problm: Script should read that property file and if the value of property file is YES, then it should start the activity of dataload.or more precisly its should return YES valuse to crontab which will start the dataload, which i will configure in crontab. If property file value is NO. then not to start dataload. If you understand n how much u understand. then please help me out. Please remove txt from extension as to get properties file. |
Or can you please provide me a script that will read a prorperty file.....???
Just to read property file. |
Hi
If you have a file with 'example' contents: Code:
# Code:
# grep -i 'DATA_LOAD' example.properties.txt | cut -f2 -d'=' Code:
#!/bin/sh Code:
DATA_LOAD=YES |
lithos you rocks buddy!!
|
Hi!
Like I have to run a batch file named dataload.bat.. which will perform further actions of loading data. which might be scheduled in crontab to run. what i should use or how i should make use of this script that will run that crontab or dataload.bat file if and only if the status of property file is YES. I have to put that under If condtion..right.. coz just new to this scripting i dn't know much about it. So please guide me.. Thanks, |
well, since I don't know IBM WCS system I can only assume that "dataload.bat" is for Windows, which I'm not familiar with scripting, only Linux.
but anyway, you can insert the line to 'run' your script into the code "testproperty.sh": Code:
#!/bin/sh You will do best if this script is running with Crontab and inside this script you call the "dataload.bat" like posted above. |
Thanks a lot for your valuable reply. I will let you know after running this system.
Yeah at last I'm going to run the whole things on AIX. I will post here by tomorrow. |
All times are GMT -5. The time now is 02:28 PM. |