source a property file in script give error


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting source a property file in script give error
# 1  
Old 01-28-2009
source a property file in script give error

I have sourced a property file in my script like this to load some variables in the script

Then i am able to echo all the property file values inside script but the script is not able to recognize other unix commands


#!/bin/bash
. build.properties

mkdir build

i am getting error
./test.sh: line 4: mkdir: command not found

please help
# 2  
Old 01-28-2009
Please post your build.properties in [code] tags
# 3  
Old 01-28-2009
It's quite possible build.properties set the PATH variable without including the existing $PATH. So look for that. If you don't find it, then post as pludi suggested.
# 4  
Old 01-29-2009
The PATH variable was the problem Thank you genius otheus
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Exit when sql script give error

Hi Guys, I am calling a SQL script which runs under while loop, i need to exit the while loop if i get error in sql script which is called while do sqlplus -s user/pass@db @test.sql id$i done test.sql whenever sqlerror exit; alter table t1 add &1 number; I need to come out of... (2 Replies)
Discussion started by: rohit_shinez
2 Replies

2. Shell Programming and Scripting

Perl script give answers by file

Hi, I am new in perl. I am running a perl installation script, its asking for paths and so many inputs. Can we provide that info by any file. so i can avoid the interactive installation. (2 Replies)
Discussion started by: Priy
2 Replies

3. Shell Programming and Scripting

Search for file, give error if more than one file is found

Want to write a function that prints an error when passed a list of file names. If the file list is empty, print error "no file found", if there are more than one file, print "error more than one file found" (22 Replies)
Discussion started by: kristinu
22 Replies

4. Shell Programming and Scripting

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???:( (7 Replies)
Discussion started by: sukhdip
7 Replies

5. Shell Programming and Scripting

Report a missing property and property value mis match script.

Hi All, I have 2 properties files - one is a master templete and other one is a node specific properties file, I need to comapre these 2 properties files and make sure the node Specific properties file contains all the properties in the master temple properties file else report the missing... (5 Replies)
Discussion started by: jayka
5 Replies

6. Solaris

Error: prtdiag failed! property not found

Hello Everyone! I have a Sun Fire E2900. When I run a prtdiag -v, it fails to give complete information. It fails with the following error message "Prtdiag failed!Property not found". Please help. # which prtdiag /usr/sbin/prtdiag # ls -l /usr/sbin/prtdiag -r-xr-xr-x 4 root bin 512... (10 Replies)
Discussion started by: pingmeback
10 Replies

7. Shell Programming and Scripting

Script to update Property Entry Values

Hi All, I'm Raghavendra. I have a very urgent requirement to develop a Shell Script which will allow to use variables in a property file as demonstarted below var1=UNIX var2=LINUX var3=WINDOWS var4=$var1,$var2 var5=$var3 Could you please help me to develop a shell script which can... (2 Replies)
Discussion started by: raghavstunner
2 Replies

8. Shell Programming and Scripting

Problem printing the property of xml file via shell script

Hi, I have a config.xml which cointains the tags like <CONFIG> <PROPERTY name="port" value="1111"/> <PROPERTY name="dbname" value="ABCDE"/> <PROPERTY name="connectstring" value="xyz/pwd"/> </CONFIG> This file is in some directory at UNix box. I need to write a... (4 Replies)
Discussion started by: neeto
4 Replies

9. UNIX for Dummies Questions & Answers

connecting to a database through a script...if not give an error msg

Hello , i have a problem in writing the shell script.. i have a script already written n just need to make a change in which when the script is not able to connect to the database ..it should print an error msg on the screen. I have already seen previous posts on how to connect to the... (3 Replies)
Discussion started by: sommer_queen
3 Replies
Login or Register to Ask a Question