Using Operating System Environment Variables in SQLPLUS

I'm looking for a way to use the Operating System Environment Variables inside of a sql script. I'd like to create a generic script that will run on all machines regardless of directory structure. I know that in SQLPLUS I can call on Operating System commands using ! followed by the Operating System command. But I'd like to use a SQL command using a Operating System variable. Example: