How Getenv Variable Style works?

please always copy the mailing list on your replies. thank you.

Thank you very much for your prompt response! That indeed worked and now I get the environment variable. However, I would like very much to get the directory name without running separately in the beginning the script (Automation is always better...). Would that be available through LAMMPS or I should seek a solution (assuming it exists) elsewhere?

this is a principal issue. you cannot export environment variables to
"upward" shell levels. i don't know what you do in your shell script,
but you can try to script the same thing from inside of lammps using
multiple shell commands or build/use the python wrapper instead and
then use python scripting.

you also need to be very careful with these kind of thing for parallel
runs: file and directory commands you typically only want to be
executed once, environment variables, however available to all
parallel tasks.