unix script - run in same shell

kbjradmin

New Member
Messages
512
Reaction score
2
Points
0
i know that a command can be forced to run in the current shell, as opposed to a new one, by placing a dot before it, ie.
Code:
$   . somescript args

is there any way to do this in the shebang line, so that the script always runs in the current shell, regardless of whether there is a dot?



edit:
another question, is there some way to declare a variable where the name is decided by the value of another variable, ie.
Code:
declare -a $varOne=( 1 2 3 4 5 )

(except that doesn't work)
 
Last edited:

kbjradmin

New Member
Messages
512
Reaction score
2
Points
0
i still need help here people... :dunno:

i got the second one, but the first one i still need help on.
 
Last edited:
Top