Hi,
Can someone help me with this small piece of code.
DIRNAME=$(dirname $0)
BASENAME=$(basename $0)
DATA="${DIRNAME}/${BASENAME}.data"
[ -r $DATA ] && . $DATA
whats is meant by [ -r $DATA ] && . $DATA here...
Regards,
Abhishek
Hi,
Can someone help me with this small piece of code.
DIRNAME=$(dirname $0)
BASENAME=$(basename $0)
DATA="${DIRNAME}/${BASENAME}.data"
[ -r $DATA ] && . $DATA
whats is meant by [ -r $DATA ] && . $DATA here...
Regards,
Abhishek
If $DATA exists and is readable, source (read) the file $DATA and include its contents in the current shell script
Ok.....
so this is a condition but without an "if ... fi" block?
Thanks for the help friend.
Regards,
Abhi