You are not logged in.
i made a timing project with command `at` in red hat linux 7.0,when this is done,there comes a file at path of /var/spool/at,the file reads like this:
define a lot of variables………………………………
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin; export PATH
PWD=/var/spool/at; export PWD
LANG=en_US.utf8; export LANG
SELINUX_LEVEL_REQUESTED=; export SELINUX_LEVEL_REQUESTED
HISTCONTROL=ignoredups; export HISTCONTROL
SHLVL=1; export SHLVL
HOME=/root; export HOME
LOGNAME=root; export LOGNAME
SSH_CONNECTION=10.192.180.19\ 62187\ 10.192.180.200\ 22; export SSH_CONNECTION
LESSOPEN=\|\|/usr/bin/lesspipe.sh\ %s; export LESSOPEN
XDG_RUNTIME_DIR=/run/user/0; export XDG_RUNTIME_DIR
OLDPWD=/var/spool/at/spool; export OLDPWD
cd /var/spool/at || {
echo 'Execution directory inaccessible' >&2
exit 1
}
${SHELL:-/bin/sh} << 'marcinDELIMITER089beff3'
echo "this"
marcinDELIMITER089beff3
i donot understand the "${SHELL:-/bin/sh} << 'marcinDELIMITER089beff3'" means,i never meet shell syntax like this .can some masters give me some explaination about this.
thanks very much!!
Offline
Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Fo … s_and_code
${SHELL:-/bin/sh}
is an example of parameter expansion, where if the parameter is unset or null, ie., $SHELL, then use /bin/sh.
Offline
It's a substitution, it checks if the env-variable SHELL is existing and if so, uses its content otherwise it falls back to the generic /bin/sh path. and << means you are providing the string afterwards as input
http://mywiki.wooledge.org/BashGuide/Pa … _Expansion for other examples
Edit: Jasonwryaaaaaaaaan *angry fist shake*
Last edited by V1del (2015-05-13 08:25:54)
Offline
It's a substitution, it checks if the env-variable SHELL is existing and if so, uses its content otherwise it falls back to the generic /bin/sh path. and << means you are providing the string afterwards as input
http://mywiki.wooledge.org/BashGuide/Pa … _Expansion for other examples
Edit: Jasonwryaaaaaaaaan *angry fist shake*
thanks very much,you remind me the syntax , i checked the book find the exact answer like this kind of syntax
Offline
i made a timing project with command `at` in red hat linux 7.0
If you are using Red Hat, then you should direct your queries to their support community.
https://wiki.archlinux.org/index.php/Fo … pport_ONLY
However, since this is a distro-agnostic question and has already been answered, I will leave this topic in place. Please remember to mark your topic as solved.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline