The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Difference between SET and SETENV 435 Gavea UNIX for Dummies Questions & Answers 2 11-10-2003 09:07 PM
How do I set permanent setenv !!! geoquest Shell Programming and Scripting 1 09-07-2002 09:53 AM
What 's setenv? myoeminn Shell Programming and Scripting 2 03-05-2002 09:24 PM
set, setenv w6u6f UNIX for Dummies Questions & Answers 1 01-31-2002 04:58 PM
setenv Question ianf UNIX for Dummies Questions & Answers 3 12-19-2001 05:38 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 12-06-2008
max_475 max_475 is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 7
setenv.

helllo every body ..
hope you are having good time programming in unix .

here is a little problem faced me :
Code:
setenv("myvar","bla bla",1); 
system("myvar=$(grep....)); 

printf("%s\n", getenv("myvar"));
will print :
bla bla ..

how can i get the value of grep into my program ?
what i figurd out that is after
Code:
system("myvar=hello");
myvar will have the same old value,
but:
Code:
system("myvar=hello; echo $myvar");
will pring hello without changing myvar value.
 

Bookmarks

Tags
shell script, shell scripting, unix scripting, unix scripting basics

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:37 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0