Create Variable for a PATH

Hello all,

I need to create a variable that contains a path to a program. I'd like to reference that variable later in the script to execute the program. Does anyone have any ideas how I can accomplish this?

Thanks,
Mark :slight_smile:

a=/usr/myfolder/file

a is the variable :stuck_out_tongue:

Edit: oh an to execute it:

$a

or
sh $a

#!/bin/ksh
export MYPATH=/path/to/myfile

#......... later on

$MYPATH/myprogram