Bash
Bash record
env
# add share lib search
# option1 for tmp
export LD_LIBRARY_PATH=/opt/pgsql/lib
# option2 for persistent
echo "/opt/pgsql/lib" >> /etc/ld.so.conf.d/pgsql.conf
ldconfig
# add env and man path
# option1 for tmp
PATH=/usr/local/pgsql/bin:$PATH
export PATH
MANPATH=/usr/local/pgsql/share/man:$MANPATH
export MANPATH
# option2 for persistent
echo "PATH=/usr/local/pgsql/bin:$PATH" >> ~/.bashrc
source ~/.bashrc
tee > customer.env << "EOF"
APP_NAME=myapp
APP_PORT=8080
EOF
# local variable still valid in current shell: source and .
. customer.env
source customer.env
echo $APP_NAMEexec
function
set
printf
truncate string
Reference:
Last updated