Validating multiple file
Hi,
It may be simple ... but am not getting a break here...Any help would be really appreciated... I want to validate couple of variables before i execute a command Here is the scenario Code:
count=' ${NAME_SRC_PATH} | grep "^${name}\/$" | wc -l` Say like NAME_SRC_PATH1,NAME_SRC_PATH2.NAME_SRC_PATH3,NAME_SRC_PATH4,NAME_SRC_PATH5... the paths are declared by me only ...and if the name exists in NAME_SRC_PATH3 .. it should return name exits is 3...likewise..for all... i understand its simple... am totally blank now... any pointer would be helpful.... |
To check for blank variables, I usually do something simple like:
Code:
if [ x$VARIABLE == "x" ]; then Code:
if [ -d $DIRECTORY ]; then |
Hi...thanks first.....
no its not directory.... i think ...that if- conidtion will work.... thanks alot.... |
See example 7.6 here http://tldp.org/LDP/abs/html/comparison-ops.html
|
All times are GMT -5. The time now is 05:51 PM. |