Register
It is currently Fri Dec 19, 2014 4:23 am

Scrript to test the variable content.


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Tue May 26, 2009 6:27 am   

Joined: Tue May 26, 2009 4:51 am
Posts: 1
Why is not accessible the contents of the variable LOG1?

$ touch file
$ ls -l file
-rw-r--r-- 1 oracle dba 0 May 26 12:50 file
$ LOG=file
$ test -z $LOG || ( test -f $LOG && ( LOG1=$LOG ; echo $LOG1 ; export LOG1 ) )
file
$ echo $LOG1

$


Top
 Profile  
 PostPosted: Wed Jul 22, 2009 1:06 pm   
Moderator
User avatar

Joined: Wed May 03, 2006 2:05 pm
Posts: 242
Okay, this is a really old post so I hope you've got it figured out by now. Your syntax isn't familiar to be, but this seems to do what It looks to me like you're trying to do:

Code:
[ -z $LOG ]||[ -f $LOG ] && LOG1=$LOG; echo $LOG1; export LOG1


I hope this helps!


Top
 Profile YIM  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP