mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-05 17:52:30 +02:00
Imported from ../bash-2.01.tar.gz.
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# show that setting a trap on SIGCHLD is not disastrous.
|
||||
#
|
||||
|
||||
trap 'echo caught a child death' SIGCHLD
|
||||
|
||||
sleep 5 &
|
||||
sleep 5 &
|
||||
sleep 5 &
|
||||
|
||||
wait
|
||||
|
||||
exit 0
|
||||
@@ -1,3 +0,0 @@
|
||||
echo this is $0
|
||||
. ./dot-test-1.sub
|
||||
echo after . dot-test-1.sub
|
||||
@@ -1 +0,0 @@
|
||||
echo this is dot-test-1.sub
|
||||
@@ -1,26 +0,0 @@
|
||||
aflag=
|
||||
bflag=
|
||||
|
||||
while getopts ab: name
|
||||
do
|
||||
case $name in
|
||||
a) aflag=1 ;;
|
||||
b) bflag=1
|
||||
bval=$OPTARG;;
|
||||
?) echo Usage: $0 [-a] [-b value] args
|
||||
exit 2;;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
if [ ! -z "$aflag" ] ; then echo -a specified ; fi
|
||||
if [ ! -z "$bflag" ] ; then echo -b $bval specified ; fi
|
||||
|
||||
if [ "$OPTIND" -gt 1 ]
|
||||
then
|
||||
shift $(( $OPTIND - 1 ))
|
||||
fi
|
||||
|
||||
echo remaining args: "$*"
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,9 @@
|
||||
foo() { case $1 in a*) ;; *) ;; esac ;}
|
||||
bar() { case $1 in [abc]*) ;; *);; esac ;}
|
||||
baz() { case $1 in xyzzy) ;; *) ;; esac ;}
|
||||
for x in /usr/lib/*/*
|
||||
do
|
||||
foo $x
|
||||
bar $x
|
||||
baz $x
|
||||
done
|
||||
@@ -1,26 +0,0 @@
|
||||
read line1
|
||||
|
||||
echo read line1 \"$line1\"
|
||||
|
||||
exec 4</etc/passwd
|
||||
|
||||
exec 5<&0
|
||||
exec 0<&4
|
||||
|
||||
read line2
|
||||
|
||||
echo read line2 \"$line2\"
|
||||
|
||||
exec 0<&5
|
||||
|
||||
read line3
|
||||
|
||||
echo read line3 \"$line3\"
|
||||
|
||||
exec 0<&4
|
||||
|
||||
read line4
|
||||
|
||||
echo read line4 \"$line4\"
|
||||
|
||||
exec 4<&-
|
||||
@@ -1,8 +0,0 @@
|
||||
#
|
||||
# Test the effect of input buffering on the shell's input
|
||||
#
|
||||
echo this is redir.t3.sh
|
||||
|
||||
exec 0< redir.t3.sub
|
||||
|
||||
echo after exec in redir.t3.sh
|
||||
@@ -1 +0,0 @@
|
||||
echo this is redir-test-3.sub
|
||||
@@ -1,12 +0,0 @@
|
||||
echo "Point 1"
|
||||
exec 3</etc/passwd
|
||||
exec 4>/tmp/a
|
||||
exec 5>/tmp/b
|
||||
echo "Point 2"
|
||||
echo to a 1>&4
|
||||
echo to b 1>&5
|
||||
exec 11</etc/printcap
|
||||
echo "Point 3"
|
||||
echo to a 1>&4
|
||||
echo to b 1>&5
|
||||
exit 0
|
||||
@@ -1 +0,0 @@
|
||||
../../bash redir.t1.sh
|
||||
@@ -1,3 +0,0 @@
|
||||
#
|
||||
# the `after exec in ...' should not be echoed
|
||||
../../bash < redir.t3.sh
|
||||
@@ -7,6 +7,3 @@ while set -e ; test -r .file ; do
|
||||
esac
|
||||
set +e
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,3 @@ while set +e ; test -r .file ; do
|
||||
set -e
|
||||
done
|
||||
rm -f .file
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user