bash-20120322 remove leftover and stray files

This commit is contained in:
Chet Ramey
2012-04-09 10:01:36 -04:00
parent ec860d767b
commit 1bb5d5c699
40 changed files with 0 additions and 63224 deletions
-9
View File
@@ -1,9 +0,0 @@
BUILD_DIR=/usr/local/build/chet/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR
export THIS_SH PATH
rm -f /tmp/xx
/bin/sh "$@"
-112
View File
@@ -1,112 +0,0 @@
# test cases for array quoting and escaping fixed post bash-3.2-release
oIFS="$IFS"
a=(a b c)
echo ${a[@]}
a2=("${a[@]/#/"-iname '"}")
recho "${a2[@]}"
echo "${dbg-"'hey'"}"
echo "${dbg-"hey"}"
echo "${dbg-'"'hey}"
echo "${dbg-'"hey'}"
unset a a2
IFS=
a2=(${a[@]/#/"-iname '"})
recho "${a2[@]}"
IFS="$oIFS"
unset a a2
a=('a b' 'c d' 'e f')
recho ${a[@]:1:2}
recho "${a[@]:1:2}"
IFS=
recho ${a[@]:1:2}
recho "${a[@]:1:2}"
IFS="$oIFS"
unset a a2
a=(abc def)
# Prevent word splitting
#IFS=
a2=("${a[@]/#/"-iname '"}")
recho "${a2[@]}"
eval a2=("${a[@]/#/\"-iname \'\"}")
recho "${a2[@]}"
eval a2=("${a[@]/#/"-iname '"}")
recho "${a2[@]}"
a2=("${a[@]/#/-iname \'}")
recho "${a2[@]}"
eval a2=("${a[@]/#/-iname \'}")
recho "${a2[@]}"
set -- abc def
a2=("${@/#/"-iname '"}")
recho "${a2[@]}"
eval a2=("${@/#/"-iname '"}")
recho "${a2[@]}"
unset a a2
IFS=
pat=('*.*')
case $(ls ${pat[@]} 2>/dev/null) in
'') echo '*.* BAD' ;;
*) echo '*.* OK' ;;
esac
IFS="$oIFS"
unset a a2 pat
IFS=
s='abc'
set - ${s/b/1 2 3}
echo $#
echo "$1"
IFS="$oIFS"
unset s
set -- ab cd ef
foo="var with spaces"
IFS=
recho $foo
recho "$foo"
recho ${foo}"$@"
recho ${foo}$@
array=(ab cd ef)
recho ${foo}"${array[@]}"
recho ${foo}${array[@]}
recho $(echo $foo)"$@"
recho $(echo $foo)$@
a=('word1 with spaces' 'word2 with spaces')
set - ${a[@]/word/element}
echo $#
recho "$@"
recho $@
IFS="$oIFS"
unset a a2 array foo
-50
View File
@@ -1,50 +0,0 @@
:; ./shx
sh:
<&$fd ok
nlbq Mon Aug 3 02:45:00 EDT 1992
bang geoff
quote 712824302
setbq defmsgid=<1992Aug3.024502.6176@host>
bgwait sleep done... wait 6187
bash:
<&$fd ok
nlbq Mon Aug 3 02:45:09 EDT 1992
bang geoff
quote 712824311
setbq defmsgid=<1992Aug3.024512.6212@host>
bgwait sleep done... wait 6223
ash:
<&$fd shx1: 4: Syntax error: Bad fd number
nlbq Mon Aug 3 02:45:19 EDT 1992
bang geoff
quote getdate: `"now"' not a valid date
setbq defmsgid=<1992Aug3.` echo 024521
bgwait sleep done... wait 6241
ksh:
<&$fd ok
nlbq ./shx: 6248 Memory fault - core dumped
bang geoff
quote getdate: `"now"' not a valid date
setbq defmsgid=<1992Aug3.024530.6257@host>
bgwait no such job: 6265
wait 6265
sleep done...
zsh:
<&$fd ok
nlbq Mon Aug 3 02:45:36 EDT 1992
bang shx3: event not found: /s/ [4]
quote 712824337
setbq defmsgid=<..6290@host>
bgwait shx7: unmatched " [9]
sleep done...
:;
-10
View File
@@ -1,10 +0,0 @@
#! /bin/sh
for cmd in sh bash ash ksh zsh
do
echo
echo $cmd:
for demo in shx?
do
$cmd $demo
done
done
-36
View File
@@ -1,36 +0,0 @@
export LC_ALL=C
export LANG=C
# test out the new $(< filename) code
# it should be exactly equivalent to $(cat filename)
FILENAME=/tmp/bashtmp.x$$
trap 'rm -f $FILENAME' 0
cat >$FILENAME << EOF
line 1
line 2
line 3
EOF
LINES1=$(cat $FILENAME)
LINES2=$(< $FILENAME)
if [[ $LINES1 != $LINES2 ]]; then
echo 'whoops: $(< filename) failed'
fi
LINES2=$(< /tmp/bashtmp.x*)
if [[ $LINES1 != $LINES2 ]]; then
echo 'whoops: $(< filename) with glob expansion failed'
fi
# but the glob expansion in the redirection should fail in posix mode
set -o posix
LINES2=$(< /tmp/bashtmp.x*)
set +o posix
# now see what happens when we try it with a non-existant file
LINES3=$(< /tmp/redir-notthere)
echo $?