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 -->
  #7 (permalink)  
Old 03-20-2009
wabard wabard is offline
Registered User
  
 

Join Date: Mar 2009
Location: Adelaide, SA & Perth, WA - Australia
Posts: 25
Exclamation

Quote:
Originally Posted by vgersh99 View Post
why do you need to export?
Most likely the OPs meant this:
Code:
MYVAR=`awk -F: '$1 == "testing" { print $3;exit}' filename`

Meh... I'm too old school.. I always export for completeness... not necessary in this case, since all variables are internal to the script itself...


Good catch and good point.