Tell me first what you want to do with the script?

yashpal_ait21 <[EMAIL PROTECTED]> wrote:                                  Hi,
   I need some help in shell/awk programming. I want to
 assign some value to a shell variable in awk and print
 that value again in the shell.
 Following is the script i have written, but its not
 working :- 
 
 myFile="java-version.log"
 myLine=""
 JVMMODE="" 
 
 java -version 2>$myFile 
 
 while read myLine
 do
 echo $myLine|awk ' {if($0 ~/64/) {$'$JVMMODE'=-d64}} '
 done < $myFile 
 
 rm -f java-version.log 
 
 echo $JVMMODE 
 
 I want to set the value of JVMMODE as '-d64' in awk,
 but its not working. Please let me know, how I should
 do it. 
 
 Please reply to my ID ([EMAIL PROTECTED]).
 
 Regards,
 
 Yashpal
 
 
     
                       

 Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download 
Now! http://messenger.yahoo.com/download.php

[Non-text portions of this message have been removed]



To unsubscribe from this list, please email [EMAIL PROTECTED] & you will be 
removed. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/LINUX_Newbies/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/LINUX_Newbies/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to