Searched refs:SHELL (Results 1 - 25 of 52) sorted by relevance

123

/ast/src/cmd/ksh93/tests/
H A Drestricted.sh36 case $SHELL in
38 */*) SHELL=$pwd/$SHELL;;
39 *) SHELL=$(whence "$SHELL");;
48 [[ $SHELL != /* ]] && SHELL=$pwd/$SHELL
50 ln -s $SHELL rksh
56 check_restricted 'SHELL
[all...]
H A Dsigchld.sh32 s=$($SHELL -c '
50 $SHELL -c : > /dev/null # foreground does not generate SIGCHLD
71 got=$($SHELL -c '
87 got=$($SHELL -c '
114 got=$( ( sleep 1;print $'\n') | $SHELL -c 'function handler { : ;}
121 $SHELL -xc $'
151 x=$($SHELL 2> /dev/null -ic '/bin/notfound; sleep .5 & sleep 1;jobs')
153 x=$($SHELL 2> /dev/null -ic 'kill -0 12345678901234567876; sleep .5 & sleep 1;jobs')
157 x=$($SHELL -c "echo | $tmp/foobar")
H A Dexit.sh36 base=$(basename $SHELL)
37 cd ${SHELL%/$base}
50 SHELL=$ABSSHELL \
74 if [[ $($SHELL ./run.sh) != 123 ]]
78 $SHELL -c 'builtin -f cmd getconf; getconf --"?-version"; exit 0' >/dev/null 2>&1 || err_exit 'ksh plugin exit failed -- was ksh built with CCFLAGS+=$(CC.EXPORT.DYNAMIC)?'
H A Doptions.sh39 if [[ $( ${SHELL-ksh} -s hello<<-\!
43 then err_exit "${SHELL-ksh} -s not working"
53 [[ $($SHELL -D -c 'print hi; print $"hello"') == '"hello"' ]] || err_exit 'ksh -D not working'
63 got=$($SHELL -E -c : 2>/dev/null)
69 got=$($SHELL -E -c : 2>&1 >/dev/null)
80 [[ $(print env_hit | $SHELL 2>&1) == "OK" ]] &&
82 [[ $(print env_hit | $SHELL -E 2>&1) == "OK" ]] &&
84 [[ $(print env_hit | $SHELL +E 2>&1) == "OK" ]] &&
86 [[ $(print env_hit | $SHELL --rc 2>&1) == "OK" ]] &&
88 [[ $(print env_hit | $SHELL
[all...]
H A Dcase.sh55 if [[ $($SHELL -c '
64 [[ $($SHELL -c 'case a in
68 [[ $(VMDEBUG=1 $SHELL -c '
82 x=$($SHELL -ec 'case a in a) echo 1; false; echo 2 ;& b) echo 3;; esac')
H A Dlocale.sh37 a=$($SHELL -c '/' 2>&1 | sed -e "s,.*: *,," -e "s, *\[.*,,")
38 b=$($SHELL -c '(LC_ALL=debug / 2>/dev/null); /' 2>&1 | sed -e "s,.*: *,," -e "s, *\[.*,,")
40 b=$($SHELL -c '(LC_ALL=debug; / 2>/dev/null); /' 2>&1 | sed -e "s,.*: *,," -e "s, *\[.*,,")
71 c=$(LC_ALL=C $SHELL -c "printf $':%2s:\n' $'\303\274'")
72 u=$(LC_ALL=$locale $SHELL -c "printf $':%2s:\n' $'\303\274'" 2>/dev/null)
87 u=$(LC_ALL=$locale PS4='+$LINENO+ ' $SHELL -x -c "
99 u=$(LC_ALL=$locale $SHELL -c $'printf "%04x\n" \$\'\"\303\274\"\' \$\'\"\xE2\x82\xAC\"\'')
103 if (( $($SHELL -c $'export LC_ALL='$locale$'; print -r "\342\202\254\342\202\254\342\202\254\342\202\254w\342\202\254\342\202\254\342\202\254\342\202\254" | wc -m' 2>/dev/null) == 10 ))
104 then LC_ALL=$locale $SHELL -c b1=$'"\342\202\254\342\202\254\342\202\254\342\202\254w\342\202\254\342\202\254\342\202\254\342\202\254"; [[ ${b1:4:1} == w ]]' || err_exit 'multibyte ${var:offset:len} not working correctly'
107 #$SHELL
[all...]
H A Dbasic.sh61 [[ $SHELL != /* ]] && SHELL=$pwd/$SHELL
119 #! $SHELL
230 x=$(cat <<\! | $SHELL
236 then err_exit "$SHELL not working when standard input is a pipe"
246 if [[ $($SHELL $tmp/script <&-) != done ]]
256 if [[ $($SHELL $tmp/script) != good ]]
264 if [[ $($SHELL $tmp/script <<!
321 [[ $($SHELL
[all...]
H A Dsubshell.sh109 do $SHELL -c '
123 do $SHELL -c '
171 do for TEST_shell in "eval" "$SHELL -c"
173 then err_exit "${TEST_shell/*-c/\$SHELL -c} ${TEST_unset:+unset }${TEST_fork:+fork }$txt print failed"
177 err_exit "${TEST_shell/*-c/\$SHELL -c} ${TEST_unset:+unset }${TEST_fork:+fork }$txt command substitution failed -- expected $EXP, got $GOT"
184 r=$( ($SHELL -c '
211 r=$($SHELL -c '
228 $SHELL -c '( autoload xxxxx);print -n' || err_exit 'autoloaded functions in subshells can cause failure'
229 foo=$($SHELL <<- ++EOF++
236 $SHELL
[all...]
H A Dheredoc.sh79 $SHELL -c "
103 $SHELL -c '
121 $SHELL "$f" > /dev/null || err_exit "large here-doc with command substitution fails"
127 $SHELL -c 'x=$(
135 if x=$($SHELL -c 'cat <<< "hello world"' 2> /dev/null)
137 x=$($SHELL -c 'v="hello world";cat <<< $v' 2> /dev/null)
139 x=$($SHELL -c 'v="hello world";cat <<< "$v"' 2> /dev/null)
176 if [[ $($SHELL "$f") != abc ]]
209 if [[ $($SHELL "$f") != foobar ]]
213 [[ $($SHELL "
[all...]
H A Dbuiltins.sh135 $SHELL -c 'read x <<< hello' 2> /dev/null || err_exit 'syntax <<< not recognized'
136 ($SHELL -c 'read x[1] <<< hello') 2> /dev/null || err_exit 'read x[1] not working'
187 $SHELL -c "cd $tmp/a/b; cd c" 2>/dev/null || err_exit "initial script relative cd fails"
197 [[ $($SHELL -c 'trap "print ok" SIGTERM; kill -s SIGTERM $$' 2> /dev/null) == ok ]] || err_exit 'SIGTERM not recognized'
198 [[ $($SHELL -c 'trap "print ok" sigterm; kill -s sigterm $$' 2> /dev/null) == ok ]] || err_exit 'SIGTERM not recognized'
199 [[ $($SHELL -c '( trap "" TERM);kill $$;print bad' == bad) ]] 2> /dev/null && err_exit 'trap ignored in subshell causes it to be ignored by parent'
200 ${SHELL} -c 'kill -1 -$$' 2> /dev/null
202 ${SHELL} -c 'kill -1 -$$' 2> /dev/null
204 ${SHELL} -c 'kill -s HUP -$$' 2> /dev/null
252 #FIXME#($SHELL rea
[all...]
H A Dsignal.sh55 $SHELL 2> out2 <<- \EOF
97 # d call next script directly, otherwise via $SHELL -c
265 tst $SHELL > tst.got
273 [[ $(LC_ALL=C $SHELL -c 'trap "print SIGUSR1 ; exit 0" USR1; (trap "" USR1 ; exec kill -USR1 $$ & sleep 5); print done') == SIGUSR1 ]] || err_exit 'subshell ignoring signal does not send signal to parent'
276 [[ $(LC_ALL=C $SHELL -c 'trap "print SIGUSR1 ; exit 0" USR1; (trap "exit" USR1 ; exec kill -USR1 $$ & sleep 5); print done') == SIGUSR1 ]] || err_exit 'subshell catching signal does not send signal to parent'
285 $SHELL <<- EOF
302 $SHELL 2> /dev/null -c 'sleep 2 && kill $$ & trap "print done; exit 3" EXIT; (sleep 5); print finished' > $tmp/sig
310 $SHELL 2> /dev/null -c 'sleep 2 && kill $$ & trap "print done; exit 3" EXIT; sleep 5; print finished' > $tmp/sig
318 { $SHELL 2> /dev/null -c 'sleep 2 && kill $$ & trap "print done; exit 3" EXIT; (sleep 5); print finished' > $tmp/sig ;} 2> /dev/null
326 { $SHELL
[all...]
H A Dio.sh129 $SHELL -c '
147 [[ $( $SHELL ./script) == $'hello\nworld' ]] || err_exit 'closing 3 & 4 causes script to fail'
193 [[ $($SHELL $tmp/1) == ok ]] || err_exit "parent i/o causes child script to fail"
264 if $SHELL -c '{n}</dev/null' 2> /dev/null
269 $SHELL -ic '
282 $SHELL -c "{ > $tmp/1 ; date;} >&- 2> /dev/null" > $tmp/2
284 $SHELL -c "$SHELL -c ': 3>&1' 1>&- 2>/dev/null" && err_exit 'closed standard output not passed to subshell'
285 [[ $(cat <<- \EOF | $SHELL
294 $SHELL
[all...]
H A Dbracket.sh179 if [[ -u $SHELL ]]
180 then err_exit "setuid on $SHELL"
182 if [[ -g $SHELL ]]
183 then err_exit "setgid on $SHELL"
238 $SHELL -c 't=1234567890; [[ $t == @({10}(\d)) ]]' 2> /dev/null || err_exit ' @({10}(\d)) pattern not working'
239 $SHELL -c '[[ att_ == ~(E)(att|cus)_.* ]]' 2> /dev/null || err_exit ' ~(E)(att|cus)_* pattern not working'
240 $SHELL -c '[[ att_ =~ (att|cus)_.* ]]' 2> /dev/null || err_exit ' =~ ere not working'
241 $SHELL -c '[[ abc =~ a(b)c ]]' 2> /dev/null || err_exit '[[ abc =~ a(b)c ]] fails'
242 $SHELL -xc '[[ abc =~ \babc\b ]]' 2> /dev/null || err_exit '[[ abc =~ \babc\b ]] fails'
246 e=$($SHELL
[all...]
H A Dattributes.sh84 if [[ $($SHELL -c 'echo $x') != export ]]
87 if [[ $($SHELL -c 'xi=xi+4;echo $xi') != 24 ]]
90 x=$(foo=abc $SHELL <<!
92 $SHELL -c 'print \$foo'
202 then [[ $(env '!=1' $SHELL -c 'echo ok' 2>/dev/null) == ok ]] || err_exit 'malformed environment terminates shell'
213 [[ $($SHELL -c 'unset foo;typeset -Z2 foo; print ${foo:-3}' 2> /dev/null) == 3 ]] || err_exit '${foo:-3} not 3 when typeset -Z2 field undefined'
214 [[ $($SHELL -c 'unset foo;typeset -Z2 foo; print ${foo:=3}' 2> /dev/null) == 03 ]] || err_exit '${foo:=-3} not 3 when typeset -Z2 foo undefined'
226 [[ $($SHELL -c 'typeset -r IFS=;print -r $(pwd)' 2> /dev/null) == "$(pwd)" ]] || err_exit 'readonly IFS causes command substitution to fail'
293 { $SHELL <<- EOF
299 { $SHELL <<
[all...]
H A Dquoting.sh332 [[ $($SHELL -c 'print a[') == 'a[' ]] || err_exit "unbalanced '[' in command arg fails"
333 $SHELL -c $'false && (( `wc -l /dev/null | nawk \'{print $1}\'` > 2 )) && true;:' 2> /dev/null || err_exit 'syntax error with ` in arithmetic expression'
334 { $SHELL -c '(( 1`: "{ }"` ))' ;} 2> /dev/null || err_exit 'problem with ` inside (())'
343 [[ $($SHELL -c 'set -- ${1+"$@"}; print $#' cmd '') == 1 ]] || err_exit '${1+"$@"} with one empty argument fails'
344 [[ $($SHELL -c 'set -- ${1+"$@"}; print $#' cmd foo '') == 2 ]] || err_exit '${1+"$@"} with one non-empty and on empty argument fails'
345 [[ $($SHELL -c 'set -- ${1+"$@"}; print $#' cmd "" '') == 2 ]] || err_exit '${1+"$@"} with two empty arguments fails'
346 [[ $($SHELL -c 'set -- ${1+"$@"}; print $#' cmd "" '' '') == 3 ]] || err_exit '${1+"$@"} with three empty arguments fails'
347 [[ $($SHELL -c 'set -- "$@"; print $#' cmd '') == 1 ]] || err_exit '"$@" with one empty argument fails'
348 [[ $($SHELL -c 'set -- "${@:2}"; print $#' cmd '') == 0 ]] || err_exit '"$@" with one empty argument fails'
349 [[ $($SHELL
[all...]
H A Dpath.sh73 [[ $($SHELL -c 'print -r -- "$PATH"') == "$PATH" ]] || err_exit 'export PATH lost in subshell'
88 [[ $($SHELL ./bug1 2>/dev/null) == ok ]] || err_exit "PATH in function not working"
101 ($SHELL ./bug1) 2> /dev/null || err_exit "path_delete bug"
103 if $SHELL tdir > /dev/null 2>&1
108 if [[ $($SHELL ls 2> /dev/null) != hi ]]
109 then err_exit "$SHELL name not executing version in current directory"
169 got=$($SHELL -c "unset FPATH; PATH=/dev/null; $cmd" 2>&1)
171 got=$($SHELL -c "unset FPATH; PATH=/dev/null; $cmd" 2>&1)
182 got=$($SHELL -c "unset FPATH; PATH=/dev/null; whence ./notfound" 2>&1)
184 got=$($SHELL
[all...]
H A Dsubstring.sh257 var=$($SHELL -c 'v=/vin:/usr/vin r=vin; : ${v//vin/${r//v/b}};typeset -p .sh.match') 2> /dev/null
280 $SHELL -c $'v=\'$(hello)\'; [[ ${v//\'$(\'/-I\'$(\'} == -I"$v" ]]' 2> /dev/null || err_exit "\${var/pattern} not working with \$( as pattern"
282 $SHELL -c '[[ ! ${X[@]:0:300} ]]' 2> /dev/null || err_exit '${X[@]:0:300} with X undefined fails'
283 $SHELL -c '[[ ${@:0:300} == "$0" ]]' 2> /dev/null || err_exit '${@:0:300} with no arguments fails'
299 [[ $(string=$string $SHELL -c ": \${string/$pattern/}; print \${.sh.match[26]}") == Z ]] || err_exit -u2 'sh.match[26] not Z'
507 if [[ $($SHELL -c $'export LC_ALL=C.UTF-8; print -r "\342\202\254\342\202\254\342\202\254\342\202\254w\342\202\254\342\202\254\342\202\254\342\202\254" | wc -m' 2>/dev/null) == 10 ]]
508 then LC_ALL=C.UTF-8 $SHELL -c b1=$'"\342\202\254\342\202\254\342\202\254\342\202\254w\342\202\254\342\202\254\342\202\254\342\202\254"; [[ ${b1:4:1} == w ]]' || err_exit 'multibyte ${var:offset:len} not working correctly'
510 { $SHELL -c 'unset x;[[ ${SHELL:$x} == $SHELL ]]';}
[all...]
H A Darith.sh237 $SHELL -nc '((a = 1))' 2> /dev/null || err_exit "sh -n fails with arithmetic"
238 $SHELL -nc '((a.b++))' 2> /dev/null || err_exit "sh -n fails with arithmetic2"
315 $SHELL -c 'i=0;(( ofiles[i] != -1 && (ofiles[i] < mins || mins == -1) ));exit 0' 2> /dev/null || err_exit 'lexical error with arithemtic expression'
316 $SHELL -c '(( +1 == 1))' 2> /dev/null || err_exit 'unary + not working'
322 $SHELL -c 'typeset x$((10))=foo' 2> /dev/null || err_exit 'typeset x$((10)) parse error'
364 [[ $( ($SHELL -c '((++1))' 2>&1) 2>/dev/null ) == *++1:* ]] || err_exit "((++1)) not generating error message"
434 do [[ $( ( $SHELL -c "( (($expr)) ) || print ok" ) 2>/dev/null ) == ok ]] || err_exit "divide by zero not trapped: $expr"
438 do [[ $( ( $SHELL -c "( print -r -- \$(($expr)) )" ) 2>/dev/null ) == 2 ]] || err_exit "invalid value for: $expr"
441 $SHELL -c 'integer x=3 y=2; (( (y += x += 2) == 7 && x==5))' 2> /dev/null || err_exit '((y += x += 2)) not working'
442 $SHELL
[all...]
H A Dtypes.sh146 $SHELL 2> /dev/null <<- +++ || err_exit 'typedef with only f(){} fails'
154 $SHELL 2> /dev/null <<- +++ || err_exit 'unable to redefine f discipline function'
169 $SHELL 2> /dev/null <<- +++ && err_exit 'invalid discipline name should be an error'
258 $SHELL > /dev/null <<- '+++++' || err_exit 'passing _ as nameref arg not working'
272 [[ $( $SHELL << \+++
290 [[ $( $SHELL << \+++
363 got=$($SHELL <<- \EOF
414 { x=$( $SHELL 2> /dev/null << \++EOF++
458 $SHELL 2> /dev/null -c 'true || { typeset -T Type_t=(typeset name=foo);
476 if n=$(FPATH=$PWD PATH=$PWD:$PATH $SHELL
[all...]
H A Darrays.sh256 $SHELL -c 'x=(if then else fi)' 2> /dev/null || err_exit 'reserved words in x=() assignment not working'
266 if [[ $($SHELL -c 'print $foo') != 143 ]]
269 ( $SHELL -c '
274 [[ $($SHELL -c "print $foo") == 143 ]]'
318 [[ $( ($SHELL -c 'typeset -A var; (IFS=: ; set -A var a:b:c ;print ${var[@]});:' )2>/dev/null) == 'a b c' ]] || err_exit 'change associative to index failed'
338 [[ $($SHELL -c "var=(foo bar);export var;$tmp/script") == foo ]] || err_exit 'export array not exporting just first element'
353 [[ $($SHELL -c "typeset -A foo;$tmp/script") == foo ]] 2> /dev/null || err_exit 'empty associative arrays not being cleared correctly before scripts'
354 [[ $($SHELL -c "typeset -A foo;foo[abc]=abc;$tmp/script") == foo ]] 2> /dev/null || err_exit 'associative arrays not being cleared correctly before scripts'
405 [[ $($SHELL <<- \++EOF+++
419 [[ $($SHELL <<
[all...]
/ast/src/cmd/kshlib/dbm_t/
H A DMakefile7 :TEST: dbm_t.tst $$(SHELL)
/ast/src/cmd/kshlib/codex/
H A DMakefile11 :TEST: codex.tst $$(SHELL)
/ast/src/cmd/kshlib/dbm/
H A DMakefile9 :TEST: dbm.tst $$(SHELL)
/ast/src/cmd/3d/
H A D3d.sh213 shell=$SHELL
215 SHELL=
247 s) SHELL=$OPTARG ;;
345 case $SHELL in
347 SHELL=`PATH=$dir/bin:$PATH whence -p $t 2>/dev/null`
350 SHELL=${SHELL:-$shell}
351 SHELL=${SHELL:-/bin/sh}
352 export SHELL
[all...]
/ast/src/lib/libvcodex/
H A DMakefile79 $(MAKE) SHELL="$(SHELL)" CC="$(CC)" CCMODE="$(CCMODE)" \
83 $(MAKE) SHELL="$(SHELL)" CC="$(CC)" CCMODE="$(CCMODE)" \
88 $(MAKE) SHELL="$(SHELL)" CC="$(CC)" CCMODE="$(CCMODE)" \
93 $(MAKE) SHELL="$(SHELL)" CC="$(CC)" CCMODE="$(CCMODE)" \
99 $(MAKE) SHELL="$(SHELL)" C
[all...]

Completed in 27 milliseconds

123