Created
November 8, 2023 16:25
-
-
Save stephan-buckmaster/3899291a903ad510d36cfc43fcc7bd6b to your computer and use it in GitHub Desktop.
Demo how to setting env variable in shell, execute given commant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/bash | |
# Example usage -- compile https://gist.github.com/stephan-buckmaster/fd4662953d48737f7d592eeb772e76f1 under Linux system, obtain a.out | |
# Run $ compat-demo.sh a.out 'ABC DEF' 123 | |
# a.out will have MY_LINUX_LIB_PATH set as follows | |
export MY_LINUX_LIB_PATH=/a/b/c/12/34 | |
exec "$@" # Don't know how to do this in csh/tcsh -- allows treating arguments containing spaces as expected |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment