Skip to main content

Timeline for Exporting environment variable

Current License: CC BY-SA 3.0

7 events
when toggle format what by license comment
Feb 26, 2012 at 5:41 history migrated from stackoverflow.com (revisions)
Feb 25, 2012 at 2:58 comment added Basilevs @Shazard, this answer implies you use SST as function. DATA=`STY()` (note left quotes - they get standard output of expression). To execute non-function variable (closer to your example) use eval $STY
Feb 25, 2012 at 2:31 comment added Shahzad By the way, if I do export such as export pqr="time ls" and if I specify this variable in some script then the code executes but if I place a for loop within this environment variable then shell yells at me and say for command not found.
Feb 25, 2012 at 1:57 comment added Shahzad is it possible that we can execute the code contained in environment variable on command line?
Feb 25, 2012 at 1:45 comment added Borealid @Perry Six one way, half-dozen the other.
Feb 25, 2012 at 1:44 comment added Perry He could just use single quotes, i.e. export STY='for i in {0..3}; do echo $i; done'
Feb 25, 2012 at 1:42 history answered Borealid CC BY-SA 3.0