On Sep 30, 2008, at 1:48 PM, "Andrew Farnsworth" <[EMAIL PROTECTED]>  
wrote:

> Ok,
>   Trying to decipher a Korn Shell script written by someone else.   
> What exactly do these two lines do?
>
>   cp  ${FILE:-null} ${LOG_WEEK_OLD}
>   rm -f  ${FILE:-null}
>
> I think the first line copies "/dev/null" to the log file,  
> overwritting the log file with an empty log file. (i.e. this  
> truncates the file), but if that is the case what is with the second  
> line?  How and why would you want to delete a null?
>
> Thanks,
>
> Andy

I'm just guessing, but I suspect it copies $FILE to $LOG_WEEK_OLD if  
$FILE is not null, then deletes $FILE if it is not null.

Brett

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NLUG" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nlug-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to