![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| passing a variable inside a variable to a function | KingVikram | UNIX for Dummies Questions & Answers | 2 | 01-14-2008 08:28 PM |
| Replace variable with a user defined variable | ce124 | Shell Programming and Scripting | 1 | 04-15-2007 02:56 PM |
| ksh: A part of variable A's name is inside of variable B, how to update A? | pa3be | Shell Programming and Scripting | 4 | 03-30-2005 11:29 AM |
| shell variable access | sabina | Shell Programming and Scripting | 2 | 02-24-2005 11:43 AM |
| Need help to access/mount so to access folder/files on a Remote System using Linux OS | S.Vishwanath | UNIX for Dummies Questions & Answers | 2 | 07-30-2001 08:17 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Quote:
outside fn outside fn outside fn |
|
||||
|
Works here (although I would perhaps have done it differently); which shell are you using?
Code:
bash$ cat jredx
#!/bin/sh
abc()
{
a=1
b=2
c=3
echo "k=$a \n l=$b \n m=$c"
}
eval $(abc)
echo "outside fn $k"
echo "outside fn $l"
echo "outside fn $m"
vnix$ ./jredx
outside fn 1
outside fn 2
outside fn 3
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| bash, bash eval, eval |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|