The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-16-2008
max29583 max29583 is offline
Registered User
  
 

Join Date: Dec 2006
Location: UK
Posts: 33
Shell script help required

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

Last edited by max29583; 07-16-2008 at 07:20 AM.. Reason: Missed my name at the end....