PlAwAnSaI
Administrator
Which statement is true about the script below?
Quote:
#!/bin/ksh
PATH=/usr/sbin:/usr/dt/bin:/usr/bin:.;export PATH
TERMINAL ='who am i | awk '{print$2}''
HOSTNAME='hostname'
DATE='date '+%e %b %Y %H: %M %Z''
DIR_PATH='echo $0 | awk '{print $1}' | wc -c'
DIR_PATH='expr $DIR_PATH - 12'
DIR='echo $0 | awk '{print $1}' | cut -c1-$DIR_PATH';export DIR
A. This is a C shell UNIX script.
B. When executing the echo command, the script will always look for the command in the directory from which it is run.
C. When executing the echo command, the script will always look for the command in /usr/bin before looking in the directory from which the script was run.
D. The variable HOSTNAME will be set to hostname.
Quote:
#!/bin/ksh
PATH=/usr/sbin:/usr/dt/bin:/usr/bin:.;export PATH
TERMINAL ='who am i | awk '{print$2}''
HOSTNAME='hostname'
DATE='date '+%e %b %Y %H: %M %Z''
DIR_PATH='echo $0 | awk '{print $1}' | wc -c'
DIR_PATH='expr $DIR_PATH - 12'
DIR='echo $0 | awk '{print $1}' | cut -c1-$DIR_PATH';export DIR
A. This is a C shell UNIX script.
B. When executing the echo command, the script will always look for the command in the directory from which it is run.
C. When executing the echo command, the script will always look for the command in /usr/bin before looking in the directory from which the script was run.
D. The variable HOSTNAME will be set to hostname.
