Home
last modified time | relevance | path

Searched refs:SHELL (Results 1 – 25 of 135) sorted by relevance

123456

/titanic_44/usr/src/lib/libshell/common/tests/
H A Doptions.sh39 if [[ $( ${SHELL-ksh} -s hello<<-\!
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 --norc 2>&1) == "OK" ]] &&
91 [[ $(print env_hit | $SHELL 2>&1) == "OK" ]] &&
[all …]
H A Dsun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh70 var1="$(${SHELL} -c 'unset l ; ( l=( a=1 b="BE" ) ; print "$l" ) ; print $l')" || err…
71 var2="$(${SHELL} -c 'unset l ; ( ulimit -c 0 ; l=( a=1 b="BE" ) ; print "$l" ) ; print $l')" || err…
75 var1="$(${SHELL} -c '( l=( a=1 b="BE" ) ; print "$l" ) ; print $l')" || err_exit "Non…
76 var2="$(${SHELL} -c '( ulimit -c 0 ; l=( a=1 b="BE" ) ; print "$l" ) ; print $l')" || err_exit "Non…
80 var1="$(${SHELL} -c 'unset l ; ( compound l ; l.a=1 ; l.b="BE" ; print "$l" ) ; print…
81 var2="$(${SHELL} -c 'unset l ; ( ulimit -c 0 ; compound l ; l.a=1 ; l.b="BE" ; print "$l" ) ; print…
85 var1="$(${SHELL} -c '( compound l ; l.a=1 ; l.b="BE" ; print "$l" ) ; print $l')" || err_exi…
86 var2="$(${SHELL} -c '( ulimit -c 0 ; compound l ; l.a=1 ; l.b="BE" ; print "$l" ) ; print $l')" || …
90 var1="$(${SHELL} -c 'unset l ; ( l=( a=1 b="BE" ) ; printf "%B\n" l ) ; printf "%B\n"…
91 var2="$(${SHELL} -c 'unset l ; ( ulimit -c 0 ; l=( a=1 b="BE" ) ; printf "%B\n" l ) ; printf "%B\n"…
[all …]
H A Dsun_solaris_cr_6753538_subshell_leaks_umask.sh59 x=$(${SHELL} -c 'umask 22; (umask 0); umask')
62 x=$(${SHELL} -c 'umask 20; (umask 0); umask')
65 x=$(${SHELL} -c 'umask 0; (umask 22); umask')
72 x=$(${SHELL} -c 'umask 22; ( (umask 10); umask 0); umask')
75 x=$(${SHELL} -c 'umask 20; ( (umask 10); umask 0); umask')
78 x=$(${SHELL} -c 'umask 0; ( (umask 10); umask 22); umask')
86 x=$(${SHELL} -c 'umask 22; ( umask 0); umask') || err_exit "shell failed."
87 y=$(${SHELL} -c 'umask 22; (ulimit -c 0 ; umask 0); umask') || err_exit "shell failed."
90 x=$(${SHELL} -c 'umask 20; ( umask 0); umask') || err_exit "shell failed."
91 y=$(${SHELL} -c 'umask 20; (ulimit -c 0 ; umask 0); umask') || err_exit "shell failed."
[all …]
H A Dbasic.sh61 [[ $SHELL != /* ]] && SHELL=$pwd/$SHELL
228 x=$(cat <<\! | $SHELL
234 then err_exit "$SHELL not working when standard input is a pipe"
244 if [[ $($SHELL $tmp/script <&-) != done ]]
254 if [[ $($SHELL $tmp/script) != good ]]
262 if [[ $($SHELL $tmp/script <<!
319 [[ $($SHELL -c 'trap "" HUP; $SHELL -c "(sleep 2;kill -HUP $$)& sleep 4;print done"') != done ]] &&…
320 [[ $($SHELL -c 'o=foobar; for x in foo bar; do (o=save);print $o;done' 2> /dev/null ) == $'foobar\n…
323 then [[ $($SHELL -c 'cat <(print foo)' 2> /dev/null) == foo ]] || err_exit 'process substitution no…
324 [[ $($SHELL -c $'tee >(grep \'1$\' > '$tmp/scriptx$') > /dev/null <<- \!!!
[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 "$f") == $'hello\n\tworld' ]] || err_exit "<<# not working for quoted here documents"
[all …]
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
H A Dsun_solaris_cr_6778077_sigthaw_trap.sh62 ${SHELL} -o errexit -c 'trap "true" SIGTHAW ; true' || err_exit "SIGTHAW not supported."
63 ${SHELL} -o errexit -c 'trap "true" THAW ; true' || err_exit "THAW not supported."
64 ${SHELL} -o errexit -c 'trap "true" 35 ; true' || err_exit "signal 35 not supported."
69 ${SHELL} -o errexit -c 'trap "true" SIGFREEZE ; true' || err_exit "SIGFREEZE not supported."
70 ${SHELL} -o errexit -c 'trap "true" FREEZE ; true' || err_exit "FREEZE not supported."
71 ${SHELL} -o errexit -c 'trap "true" 34 ; true' || err_exit "signal 34 not supported."
76 …str="$( ${SHELL} -c "trap true $i ; print 'ok'" 2>&1 )" || err_exit "shell returned code $? for tr…
H A Dsun_solaris_command_substitution.sh99 ${SHELL} -o errexit -c "${currtst.cmd}" >"${tmpfile}.out" &
164 testout=${ printf "%B\n" testbody | sed 's/<CS>/$(/g;s/<CE>/)/g' | ${SHELL} 2>&1 || err_exit "comma…
168 testout=${ printf "%B\n" testbody | sed 's/<CS>/${ /g;s/<CE>/ ; }/g' | ${SHELL} 2>&1 || err_exit "c…
172 testout=${ printf "%B\n" testbody | sed 's/<CS>/$( ulimit -c 0 ; /g;s/<CE>/)/g' | ${SHELL} 2>&1 || …
176 testout=${ printf "%B\n" testbody | sed 's/<CS>/$( ( /g;s/<CE>/) )/g' | ${SHELL} 2>&1 || err_exit "…
180 testout=${ printf "%B\n" testbody | sed 's/<CS>/${ ( /g;s/<CE>/) ; }/g' | ${SHELL} 2>&1 || err_exit…
208 testout=${ printf "%B\n" testbody | sed 's/<CS>/$(/g;s/<CE>/)/g' | ${SHELL} 2>&1 || err_exit "comma…
212 testout=${ printf "%B\n" testbody | sed 's/<CS>/${ /g;s/<CE>/ ; }/g' | ${SHELL} 2>&1 || err_exit "c…
216 testout=${ printf "%B\n" testbody | sed 's/<CS>/$( ulimit -c 0 ; /g;s/<CE>/)/g' | ${SHELL} 2>&1 || …
220 testout=${ printf "%B\n" testbody | sed 's/<CS>/$( ( /g;s/<CE>/) )/g' | ${SHELL} 2>&1 || err_exit "…
[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 s…
285 [[ $(cat <<- \EOF | $SHELL
294 $SHELL -c 'exec 3>; /dev/null' 2> /dev/null && err_exit '>; with exec should be an error'
295 $SHELL -c ': 3>; /dev/null' 2> /dev/null || err_exit '>; not working with at all'
[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'
184 $SHELL -c "cd $tmp/a/b; cd c" 2>/dev/null || err_exit "initial script relative cd fails"
194 [[ $($SHELL -c 'trap "print ok" SIGTERM; kill -s SIGTERM $$' 2> /dev/null) == ok ]] || err_exit 'SI…
195 [[ $($SHELL -c 'trap "print ok" sigterm; kill -s sigterm $$' 2> /dev/null) == ok ]] || err_exit 'SI…
196 [[ $($SHELL -c '( trap "" TERM);kill $$;print bad' == bad) ]] 2> /dev/null && err_exit 'trap ignore…
197 ${SHELL} -c 'kill -1 -$$' 2> /dev/null
199 ${SHELL} -c 'kill -1 -$$' 2> /dev/null
201 ${SHELL} -c 'kill -s HUP -$$' 2> /dev/null
315 if [[ $($SHELL < $tmp/script) != hello ]]
[all …]
H A DREADME.tests19 compiler being used (default is "${SHELL%/*}/shcomp",
34 $ export SHELL=<path-to-ksh93-executable>
37 $SHELL /usr/demo/ksh/tests/shtests -a "$t"
41 SHELL since /usr/bin/ksh93 on Solaris is a wrapper which
45 Valid values for SHELL are:
46 - SHELL=/usr/bin/i86/ksh93 # 32bit i386
47 - SHELL=/usr/bin/amd64/ksh93 # 64bit AMD64
48 - SHELL=/usr/bin/sparcv7/ksh93 # 32bit SPARC
49 - SHELL=/usr/bin/sparcv9/ksh93 # 64bit SPARC
50 - SHELL=/usr/bin/s390/ksh93 # 32bit SystemZ
[all …]
H A Dbracket.sh173 if [[ -u $SHELL ]]
174 then err_exit "setuid on $SHELL"
176 if [[ -g $SHELL ]]
177 then err_exit "setgid on $SHELL"
232 $SHELL -c 't=1234567890; [[ $t == @({10}(\d)) ]]' 2> /dev/null || err_exit ' @({10}(\d)) pattern no…
233 $SHELL -c '[[ att_ == ~(E)(att|cus)_.* ]]' 2> /dev/null || err_exit ' ~(E)(att|cus)_* pattern not w…
234 $SHELL -c '[[ att_ =~ (att|cus)_.* ]]' 2> /dev/null || err_exit ' =~ ere not working'
235 $SHELL -c '[[ abc =~ a(b)c ]]' 2> /dev/null || err_exit '[[ abc =~ a(b)c ]] fails'
236 $SHELL -xc '[[ abc =~ \babc\b ]]' 2> /dev/null || err_exit '[[ abc =~ \babc\b ]] fails'
240 e=$($SHELL -c '[ -z "" -a -z "" ]' 2>&1)
[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 -c "unset FPATH; PATH=/dev/null; whence $PWD/notfound" 2>&1)
[all …]
H A Dsubshell.sh108 do $SHELL -c '
122 do $SHELL -c '
170 do for TEST_shell in "eval" "$SHELL -c"
183 r=$( ($SHELL -c '
210 r=$($SHELL -c '
227 $SHELL -c '( autoload xxxxx);print -n' || err_exit 'autoloaded functions in subshells can cause fa…
228 foo=$($SHELL <<- ++EOF++
235 $SHELL 2>&1 <<- \EOF
259 $SHELL -c $'
270 got=$($SHELL -c $'
[all …]
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 …
H A Dsun_solaris_compound_nameref.sh78 ) | ${SHELL}
105 ) | out=$( ${SHELL} ) || err_exit "shell returned exit code $?"
130 ) | out=$( ${SHELL} ) || err_exit "shell returned exit code $?"
158 ) | out=$( ${SHELL} ) || err_exit "shell returned exit code $?"
181 ) | out=$( ${SHELL} ) || err_exit "shell returned exit code $?"
209 ) | out=$( ${SHELL} ) || err_exit "shell returned exit code $?"
H A Dsigchld.sh32 s=$($SHELL -c '
71 got=$($SHELL -c '
87 got=$($SHELL -c '
114 got=$( ( sleep 1;print $'\n') | $SHELL -c 'function handler { : ;}
121 $SHELL -xc $'
H A Dsignal.sh39 $SHELL 2> out2 <<- \EOF
249 tst $SHELL > tst.got
256 [[ $($SHELL -c 'trap "print SIGUSR1 ; exit 0" USR1; (trap "" USR1 ; exec kill -USR1 $$ & sleep 5); …
259 [[ $($SHELL -c 'trap "print SIGUSR1 ; exit 0" USR1; (trap "exit" USR1 ; exec kill -USR1 $$ & sleep …
286 do { $SHELL <<- EOF
300 $SHELL 2> /dev/null -c 'sleep 2 && kill $$ & trap "print done;exit 3" EXIT; (sleep 5);print finishe…
307 { $SHELL 2> /dev/null -c 'sleep 2 && kill $$ & trap "print done;exit" EXIT; (sleep 5);print finishe…
314 x=$($SHELL 2> /dev/null -c 'sleep 2 && kill $$ & trap "print done;exit 3" EXIT; (sleep 5);print fin…
320 [[ $($SHELL -c 'trap date SIGBUS;trap -p SIGBUS') ]] && err_exit 'SIGBUS should not have a trap'
H A Dsun_solaris_cr_6754020_weird_square_bracket_expansion.sh64 s="$(${SHELL} -c 'echo F[[O]')"
67 s="$(${SHELL} -c 'echo F[[[O]]')"
72 s="$(${SHELL} -c 'print F[[O]')"
75 s="$(${SHELL} -c 'print F[[[O]]')"
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 te…
213 [[ $($SHELL -c 'unset foo;typeset -Z2 foo; print ${foo:-3}' 2> /dev/null) == 3 ]] || err_exit '${…
214 [[ $($SHELL -c 'unset foo;typeset -Z2 foo; print ${foo:=3}' 2> /dev/null) == 03 ]] || err_exit '$…
226 [[ $($SHELL -c 'typeset -r IFS=;print -r $(pwd)' 2> /dev/null) == "$(pwd)" ]] || err_exit 'readonly…
291 { $SHELL <<- EOF
297 { $SHELL <<- EOF
[all …]
H A Darrays.sh256 $SHELL -c 'x=(if then else fi)' 2> /dev/null || err_exit 'reserved words in x=() assignment not wo…
266 if [[ $($SHELL -c 'print $foo') != 143 ]]
269 ( $SHELL -c '
318 [[ $( ($SHELL -c 'typeset -A var; (IFS=: ; set -A var a:b:c ;print ${var[@]});:' )2>/dev/null) == '…
338 [[ $($SHELL -c "var=(foo bar);export var;$tmp/script") == foo ]] || err_exit 'export array not expo…
353 [[ $($SHELL -c "typeset -A foo;$tmp/script") == foo ]] 2> /dev/null || err_exit 'empty associative…
354 [[ $($SHELL -c "typeset -A foo;foo[abc]=abc;$tmp/script") == foo ]] 2> /dev/null || err_exit 'assoc…
405 [[ $($SHELL <<- \++EOF+++
419 [[ $($SHELL <<- \+++EOF+++
443 [[ $($SHELL -c 'typeset -a foo;typeset | grep "foo$"' 2> /dev/null) == *index* ]] || err_exit 'typ…
[all …]
H A Dsun_solaris_cr_6835835_builtin_cat_n_broken.sh98 expected_output=$( ${SHELL} -c 'for ((i=1 ; i <= 12 ; i++ )) ; do printf "%6d\t\n" i ; done' )
118 out="$( ${SHELL} -o errexit -c "${tc.cmd}" )" || err_exit "${tc.name}: Shell failed"
121 out="$( ${SHELL} +o errexit -c "${tc.cmd}" )" || err_exit "${tc.name}: Shell failed"
132 <( ${SHELL} -c 'yes "" | head -5 | cat -n' ) \
H A Dshtests46 export LANG LC_ALL PATH PWD SHELL VMALLOC_OPTIONS
48 SHELL=${SHELL-ksh}
54 case $SHELL in
56 */*) SHELL=$d/$SHELL;;
57 *) SHELL=$(whence $SHELL);;
99 if $SHELL $i
134 if $SHELL $tmp/$o
H A Dsun_solaris_cr_6800929_large_command_substitution_hang.sh142 ${SHELL} -o errexit -c "${currtst.cmd}" >"${tmpfile}.out" &
167 ${SHELL} -o errexit -c 'builtin uniq ; set -- `cat /etc/termcap | sort | uniq` ; true' >/dev/null &
178 ${SHELL} -o errexit -c 'builtin uniq ; set -- ${ cat /etc/termcap | sort | uniq ; } ; true' >/dev/n…
189 ${SHELL} -o errexit -c 'builtin -d uniq /bin/uniq ; set -- `cat /etc/termcap | sort | uniq` ; true'…
200 ${SHELL} -o errexit -c 'builtin -d uniq /bin/uniq ; set -- ${ cat /etc/termcap | sort | uniq ; } ; …
H A Dfunctions.sh161 if ! $SHELL -c $tmp/script
164 $SHELL -c "trap 'rm $tmp/script' EXIT"
178 if [[ $( $SHELL $tmp/script arg1 arg2) != arg2 ]]
232 if $SHELL -n 2> /dev/null <<-!
413 if [[ $($SHELL < tst) == error ]]
427 [[ $(PATH=$PATH: $SHELL -c '. dotscript;print $#') == 3 ]] || err_exit 'positional parameters not p…
455 print $'a(){\ndate\n}' | $SHELL 2> /dev/null || err_exit 'parser error in a(){;date;}'
746 $SHELL -c $tmp/script > $tmp/data2
834 $SHELL -c '
845 ( $SHELL << \++EOF++
[all …]

123456