multi_test.sh revision 168257
11590Srgrimes#!/bin/sh -
21590Srgrimes#
31590Srgrimes# Copyright (c) 1992 Diomidis Spinellis.
41590Srgrimes# Copyright (c) 1992, 1993
51590Srgrimes#	The Regents of the University of California.  All rights reserved.
61590Srgrimes#
71590Srgrimes# Redistribution and use in source and binary forms, with or without
81590Srgrimes# modification, are permitted provided that the following conditions
91590Srgrimes# are met:
101590Srgrimes# 1. Redistributions of source code must retain the above copyright
111590Srgrimes#    notice, this list of conditions and the following disclaimer.
121590Srgrimes# 2. Redistributions in binary form must reproduce the above copyright
131590Srgrimes#    notice, this list of conditions and the following disclaimer in the
141590Srgrimes#    documentation and/or other materials provided with the distribution.
151590Srgrimes# 4. Neither the name of the University nor the names of its contributors
161590Srgrimes#    may be used to endorse or promote products derived from this software
171590Srgrimes#    without specific prior written permission.
181590Srgrimes#
191590Srgrimes# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
201590Srgrimes# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
211590Srgrimes# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
221590Srgrimes# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
231590Srgrimes# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
241590Srgrimes# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
251590Srgrimes# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
261590Srgrimes# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
271590Srgrimes# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
281590Srgrimes# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
291590Srgrimes# SUCH DAMAGE.
301590Srgrimes#
311590Srgrimes#	@(#)sed.test	8.1 (Berkeley) 6/6/93
321590Srgrimes#
33117900Sdds#	$FreeBSD: head/tools/regression/usr.bin/sed/multitest.t 168257 2007-04-02 07:50:10Z yar $
34117900Sdds#
351590Srgrimes
361590Srgrimes# sed Regression Tests
371590Srgrimes#
38167552Sdds# The directory regress.test.out contains the expected test results
39167552Sdds#
40167552Sdds# These are the regression tests created during the development of the
41167552Sdds# BSD sed.  The reference file naming scheme used in this script can't
42167552Sdds# handle gracefully the insertion of new tests between existing ones.
43167552Sdds# Therefore, either use the new m4-based regress.t framework, or add
44167552Sdds# tests after the last existing test.
451590Srgrimes
461590Srgrimesmain()
471590Srgrimes{
48167552Sdds	REGRESS=regress.multitest.out
491590Srgrimes	DICT=/usr/share/dict/words
501590Srgrimes
511590Srgrimes	awk 'END { for (i = 1; i < 15; i++) print "l1_" i}' </dev/null >lines1
521590Srgrimes	awk 'END { for (i = 1; i < 10; i++) print "l2_" i}' </dev/null >lines2
531590Srgrimes
54167555Sdds	echo "1..121"
55167552Sdds
561590Srgrimes	exec 4>&1 5>&2
57167552Sdds	tests
58167552Sdds	exec 1>&4 2>&5
591590Srgrimes
60167552Sdds	# Remove temporary files
61167552Sdds	rm -f current.out lines[1-4] script[1-2]
621590Srgrimes}
631590Srgrimes
641590Srgrimestests()
651590Srgrimes{
66167552Sdds	SED=sed
67167552Sdds	MARK=0
681590Srgrimes
691590Srgrimes	test_args
701590Srgrimes	test_addr
711590Srgrimes	test_group
721590Srgrimes	test_acid
731590Srgrimes	test_branch
741590Srgrimes	test_pattern
751590Srgrimes	test_print
761590Srgrimes	test_subst
77167555Sdds	test_error
78167552Sdds	# Handle the result of the last test
79167552Sdds	result
801590Srgrimes}
811590Srgrimes
82167552Sdds# Display a test's result
83167552Sddsresult()
84167552Sdds{
85167552Sdds	if [ "$TODO" = '1' ] ; then
86167552Sdds		TODO='TODO '
87167552Sdds	else
88167552Sdds		TODO=''
89167552Sdds	fi
90167555Sdds	if ! [ -r $REGRESS/${MARK}_${TESTNAME} ] ; then
91167555Sdds		echo "Seeding $REGRESS/${MARK}_${TESTNAME} with current result" 1>&2
92167555Sdds		cp current.out $REGRESS/${MARK}_${TESTNAME}
93167555Sdds	fi
94167552Sdds	if diff -c $REGRESS/${MARK}_${TESTNAME} current.out ; then
95167552Sdds		echo "ok $MARK $TESTNAME # $TODO$COMMENT"
96167552Sdds	else
97167552Sdds		echo "not ok $MARK $TESTNAME # $TODO$COMMENT"
98167552Sdds	fi 1>&4 2>&5
99167552Sdds}
100167552Sdds
101167552Sdds# Mark the beginning of each test
1021590Srgrimesmark()
1031590Srgrimes{
104167552Sdds	[ $MARK -gt 0 ] && result
1051590Srgrimes	MARK=`expr $MARK + 1`
106167552Sdds	TESTNAME=$1
1071590Srgrimes	exec 1>&4 2>&5
108167552Sdds	exec >"current.out"
1091590Srgrimes}
1101590Srgrimes
1111590Srgrimestest_args()
1121590Srgrimes{
113167552Sdds	COMMENT='Argument parsing - first type'
1141590Srgrimes	mark '1.1'
115167549Sdds	$SED 's/^/e1_/p' lines1
1161590Srgrimes	mark '1.2' ; $SED -n 's/^/e1_/p' lines1
1171590Srgrimes	mark '1.3'
118167549Sdds	$SED 's/^/e1_/p' <lines1
1191590Srgrimes	mark '1.4' ; $SED -n 's/^/e1_/p' <lines1
120167552Sdds	COMMENT='Argument parsing - second type'
1211590Srgrimes	mark '1.4.1'
1221590Srgrimes	$SED -e '' <lines1
1231590Srgrimes	echo 's/^/s1_/p' >script1
1241590Srgrimes	echo 's/^/s2_/p' >script2
1251590Srgrimes	mark '1.5'
126167549Sdds	$SED -f script1 lines1
1271590Srgrimes	mark '1.6'
128167549Sdds	$SED -f script1 <lines1
1291590Srgrimes	mark '1.7'
130167549Sdds	$SED -e 's/^/e1_/p' lines1
1311590Srgrimes	mark '1.8'
132167549Sdds	$SED -e 's/^/e1_/p' <lines1
1331590Srgrimes	mark '1.9' ; $SED -n -f script1 lines1
1341590Srgrimes	mark '1.10' ; $SED -n -f script1 <lines1
1351590Srgrimes	mark '1.11' ; $SED -n -e 's/^/e1_/p' lines1
1361590Srgrimes	mark '1.12'
137167549Sdds	$SED -n -e 's/^/e1_/p' <lines1
1381590Srgrimes	mark '1.13'
139167549Sdds	$SED -e 's/^/e1_/p' -e 's/^/e2_/p' lines1
1401590Srgrimes	mark '1.14'
141167549Sdds	$SED -f script1 -f script2 lines1
1421590Srgrimes	mark '1.15'
143167552Sdds	$SED -e 's/^/e1_/p' -f script1 lines1
1441590Srgrimes	mark '1.16'
145167549Sdds	$SED -e 's/^/e1_/p' lines1 lines1
1461590Srgrimes	# POSIX D11.2:11251
1471590Srgrimes	mark '1.17' ; $SED p <lines1 lines1
1481590Srgrimescat >script1 <<EOF
1491590Srgrimes#n
1501590Srgrimes# A comment
1511590Srgrimes
1521590Srgrimesp
1531590SrgrimesEOF
1541590Srgrimes	mark '1.18' ; $SED -f script1 <lines1 lines1
1551590Srgrimes}
1561590Srgrimes
1571590Srgrimestest_addr()
1581590Srgrimes{
159167552Sdds	COMMENT='Address ranges'
1601590Srgrimes	mark '2.1' ; $SED -n -e '4p' lines1
1611590Srgrimes	mark '2.2' ; $SED -n -e '20p' lines1 lines2
1621590Srgrimes	mark '2.3' ; $SED -n -e '$p' lines1
1631590Srgrimes	mark '2.4' ; $SED -n -e '$p' lines1 lines2
1641590Srgrimes	mark '2.5' ; $SED -n -e '$a\
1651590Srgrimeshello' /dev/null
1661590Srgrimes	mark '2.6' ; $SED -n -e '$p' lines1 /dev/null lines2
1671590Srgrimes	# Should not print anything
1681590Srgrimes	mark '2.7' ; $SED -n -e '20p' lines1
169167546Sdds	mark '2.8' ; $SED -n -e '/NOTFOUND/p' lines1
1701590Srgrimes	mark '2.9' ; $SED -n '/l1_7/p' lines1
1711590Srgrimes	mark '2.10' ; $SED -n ' /l1_7/ p' lines1
172167544Sdds	mark '2.11' ; $SED -n '\_l1\_7_p' lines1
1731590Srgrimes	mark '2.12' ; $SED -n '1,4p' lines1
1741590Srgrimes	mark '2.13' ; $SED -n '1,$p' lines1 lines2
1751590Srgrimes	mark '2.14' ; $SED -n '1,/l2_9/p' lines1 lines2
1761590Srgrimes	mark '2.15' ; $SED -n '/4/,$p' lines1 lines2
1771590Srgrimes	mark '2.16' ; $SED -n '/4/,20p' lines1 lines2
1781590Srgrimes	mark '2.17' ; $SED -n '/4/,/10/p' lines1 lines2
1791590Srgrimes	mark '2.18' ; $SED -n '/l2_3/,/l1_8/p' lines1 lines2
180167544Sdds	mark '2.19' ; $SED -n '12,3p' lines1 lines2
181167544Sdds	mark '2.20' ; $SED -n '/l1_7/,3p' lines1 lines2
1821590Srgrimes}
1831590Srgrimes
1841590Srgrimestest_group()
1851590Srgrimes{
186167552Sdds	COMMENT='Brace and other grouping'
1871590Srgrimes	mark '3.1' ; $SED -e '
1881590Srgrimes4,12 {
1891590Srgrimes	s/^/^/
1901590Srgrimes	s/$/$/
1911590Srgrimes	s/_/T/
1921590Srgrimes}' lines1
1931590Srgrimes	mark '3.2' ; $SED -e '
1941590Srgrimes4,12 {
1951590Srgrimes	s/^/^/
1961590Srgrimes	/6/,/10/ {
1971590Srgrimes		s/$/$/
1981590Srgrimes		/8/ s/_/T/
1991590Srgrimes	}
2001590Srgrimes}' lines1
2011590Srgrimes	mark '3.3' ; $SED -e '
2021590Srgrimes4,12 !{
2031590Srgrimes	s/^/^/
2041590Srgrimes	/6/,/10/ !{
2051590Srgrimes		s/$/$/
2061590Srgrimes		/8/ !s/_/T/
2071590Srgrimes	}
2081590Srgrimes}' lines1
2091590Srgrimes	mark '3.4' ; $SED -e '4,12!s/^/^/' lines1
2101590Srgrimes}
2111590Srgrimes
2121590Srgrimestest_acid()
2131590Srgrimes{
214167552Sdds	COMMENT='Commands a c d and i'
2151590Srgrimes	mark '4.1' ; $SED -n -e '
2161590Srgrimess/^/before_i/p
2171590Srgrimes20i\
2181590Srgrimesinserted
2191590Srgrimess/^/after_i/p
2201590Srgrimes' lines1 lines2
2211590Srgrimes	mark '4.2' ; $SED -n -e '
2221590Srgrimes5,12s/^/5-12/
2231590Srgrimess/^/before_a/p
2241590Srgrimes/5-12/a\
2251590Srgrimesappended
2261590Srgrimess/^/after_a/p
2271590Srgrimes' lines1 lines2
2281590Srgrimes	mark '4.3'
2291590Srgrimes	$SED -n -e '
2301590Srgrimess/^/^/p
2311590Srgrimes/l1_/a\
2321590Srgrimesappended
2331590Srgrimes8,10N
2341590Srgrimess/$/$/p
2351590Srgrimes' lines1 lines2
2361590Srgrimes	mark '4.4' ; $SED -n -e '
2371590Srgrimesc\
2381590Srgrimeshello
2391590Srgrimes' lines1
2401590Srgrimes	mark '4.5' ; $SED -n -e '
2411590Srgrimes8c\
2421590Srgrimeshello
2431590Srgrimes' lines1
2441590Srgrimes	mark '4.6' ; $SED -n -e '
2451590Srgrimes3,14c\
2461590Srgrimeshello
2471590Srgrimes' lines1
2481590Srgrimes# SunOS and GNU sed behave differently.   We follow POSIX
249167549Sdds	mark '4.7' ; $SED -n -e '
250167549Sdds8,3c\
251167549Sddshello
252167549Sdds' lines1
2531590Srgrimes	mark '4.8' ; $SED d <lines1
2541590Srgrimes}
2551590Srgrimes
2561590Srgrimestest_branch()
2571590Srgrimes{
258167552Sdds	COMMENT='Labels and branching'
2591590Srgrimes	mark '5.1' ; $SED -n -e '
2601590Srgrimesb label4
2611590Srgrimes:label3
2621590Srgrimess/^/label3_/p
2631590Srgrimesb end
2641590Srgrimes:label4
2651590Srgrimes2,12b label1
2661590Srgrimesb label2
2671590Srgrimes:label1
2681590Srgrimess/^/label1_/p
2691590Srgrimesb
2701590Srgrimes:label2
2711590Srgrimess/^/label2_/p
2721590Srgrimesb label3
2731590Srgrimes:end
2741590Srgrimes' lines1
2751590Srgrimes	mark '5.2'
2761590Srgrimes	$SED -n -e '
2771590Srgrimess/l1_/l2_/
2781590Srgrimest ok
2791590Srgrimesb
2801590Srgrimes:ok
2811590Srgrimess/^/tested /p
2821590Srgrimes' lines1 lines2
283168257Syar# SunOS and GNU sed behave as follows: lines 9-$ aren't printed at all
284167549Sdds	mark '5.3' ; $SED -n -e '
285167549Sdds5,8b inside
286167549Sdds1,5 {
287167549Sdds	s/^/^/p
288167549Sdds	:inside
289167549Sdds	s/$/$/p
290167549Sdds}
291167549Sdds' lines1
2921590Srgrimes# Check that t clears the substitution done flag
2931590Srgrimes	mark '5.4' ; $SED -n -e '
2941590Srgrimes1,8s/^/^/
2951590Srgrimest l1
2961590Srgrimes:l1
2971590Srgrimest l2
2981590Srgrimess/$/$/p
2991590Srgrimesb
3001590Srgrimes:l2
3011590Srgrimess/^/ERROR/
3021590Srgrimes' lines1
3031590Srgrimes# Check that reading a line clears the substitution done flag
3041590Srgrimes	mark '5.5'
3051590Srgrimes	$SED -n -e '
3061590Srgrimest l2
3071590Srgrimes1,8s/^/^/p
3081590Srgrimes2,7N
3091590Srgrimesb
3101590Srgrimes:l2
3111590Srgrimess/^/ERROR/p
3121590Srgrimes' lines1
3131590Srgrimes	mark '5.6' ; $SED 5q lines1
3141590Srgrimes	mark '5.7' ; $SED -e '
3151590Srgrimes5i\
3161590Srgrimeshello
3171590Srgrimes5q' lines1
3181590Srgrimes# Branch across block boundary
3191590Srgrimes	mark '5.8' ; $SED -e '
3201590Srgrimes{
3211590Srgrimes:b
3221590Srgrimes}
3231590Srgrimess/l/m/
3241590Srgrimestb' lines1
3251590Srgrimes}
3261590Srgrimes
3271590Srgrimestest_pattern()
3281590Srgrimes{
329167552SddsCOMMENT='Pattern space commands'
3301590Srgrimes# Check that the pattern space is deleted
3311590Srgrimes	mark '6.1' ; $SED -n -e '
3321590Srgrimesc\
3331590Srgrimeschanged
3341590Srgrimesp
3351590Srgrimes' lines1
3361590Srgrimes	mark '6.2' ; $SED -n -e '
3371590Srgrimes4d
3381590Srgrimesp
3391590Srgrimes' lines1
340167549Sdds	mark '6.3'
341167552Sdds	$SED -e 'N;N;N;D' lines1
3421590Srgrimes	mark '6.4' ; $SED -e '
3431590Srgrimes2h
3441590Srgrimes3H
3451590Srgrimes4g
3461590Srgrimes5G
3471590Srgrimes6x
3481590Srgrimes6p
3491590Srgrimes6x
3501590Srgrimes6p
3511590Srgrimes' lines1
3521590Srgrimes	mark '6.5' ; $SED -e '4n' lines1
3531590Srgrimes	mark '6.6' ; $SED -n -e '4n' lines1
3541590Srgrimes}
3551590Srgrimes
3561590Srgrimestest_print()
3571590Srgrimes{
358167552Sdds	COMMENT='Print and file routines'
3591590Srgrimes	awk 'END {for (i = 1; i < 256; i++) printf("%c", i);print "\n"}' \
3601590Srgrimes		</dev/null >lines3
3611590Srgrimes	# GNU and SunOS sed behave differently here
3621590Srgrimes	mark '7.1'
363117900Sdds	$SED -n l lines3
3641590Srgrimes	mark '7.2' ; $SED -e '/l2_/=' lines1 lines2
3651590Srgrimes	rm -f lines4
3661590Srgrimes	mark '7.3' ; $SED -e '3,12w lines4' lines1
367167552Sdds	COMMENT='w results'
3681590Srgrimes	cat lines4
3691590Srgrimes	mark '7.4' ; $SED -e '4r lines2' lines1
3701590Srgrimes	mark '7.5' ; $SED -e '5r /dev/dds' lines1
3711590Srgrimes	mark '7.6' ; $SED -e '6r /dev/null' lines1
3721590Srgrimes	mark '7.7'
373167544Sdds	sed '200q' $DICT | sed 's$.*$s/^/&/w tmpdir/&$' >script1
374167544Sdds	rm -rf tmpdir
375167544Sdds	mkdir tmpdir
376167544Sdds	$SED -f script1 lines1
377167544Sdds	cat tmpdir/*
378167544Sdds	rm -rf tmpdir
3791590Srgrimes	mark '7.8'
380167552Sdds	echo line1 > lines3
381167552Sdds	echo "" >> lines3
382167552Sdds	TODO=1
383167552Sdds	$SED -n -e '$p' lines3 /dev/null
3841590Srgrimes		
3851590Srgrimes}
3861590Srgrimes
3871590Srgrimestest_subst()
3881590Srgrimes{
389167552Sdds	COMMENT='Substitution commands'
3901590Srgrimes	mark '8.1' ; $SED -e 's/./X/g' lines1
3911590Srgrimes	mark '8.2' ; $SED -e 's,.,X,g' lines1
392167549Sdds# SunOS sed thinks we are escaping . as wildcard, not as separator
393167549Sdds	mark '8.3'
394167552Sdds	$SED -e 's.\..X.g' lines1
3951590Srgrimes	mark '8.4' ; $SED -e 's/[\/]/Q/' lines1
3961590Srgrimes	mark '8.5' ; $SED -e 's_\__X_' lines1
3971590Srgrimes	mark '8.6' ; $SED -e 's/./(&)/g' lines1
3981590Srgrimes	mark '8.7' ; $SED -e 's/./(\&)/g' lines1
3991590Srgrimes	mark '8.8' ; $SED -e 's/\(.\)\(.\)\(.\)/x\3x\2x\1/g' lines1
4001590Srgrimes	mark '8.9' ; $SED -e 's/_/u0\
4011590Srgrimesu1\
4021590Srgrimesu2/g' lines1
4031590Srgrimes	mark '8.10'
4041590Srgrimes	$SED -e 's/./X/4' lines1
4051590Srgrimes	rm -f lines4
4061590Srgrimes	mark '8.11' ; $SED -e 's/1/X/w lines4' lines1
407167552Sdds	COMMENT='s wfile results'
4081590Srgrimes	cat lines4
4091590Srgrimes	mark '8.12' ; $SED -e 's/[123]/X/g' lines1
4101590Srgrimes	mark '8.13' ; $SED -e 'y/0123456789/9876543210/' lines1
4111590Srgrimes	mark '8.14' ; 
412167549Sdds	$SED -e 'y10\123456789198765432\101' lines1
4131590Srgrimes	mark '8.15' ; $SED -e '1N;2y/\n/X/' lines1
4141590Srgrimes	mark '8.16'
415117900Sdds	echo 'eeefff' | $SED -e '
416117900Sdds		p
417117900Sdds		s/e/X/p
418117900Sdds		:x
419117900Sdds		s//Y/p 
420117900Sdds		# Establish limit counter in the hold space
421117900Sdds		# GNU sed version 3.02 enters into an infinite loop here
422117900Sdds		x 
423117900Sdds		/.\{10\}/ {
424117900Sdds			s/.*/ERROR/
425117900Sdds			b
426117900Sdds		}
427117900Sdds		s/.*/&./
428117900Sdds		x 
429117900Sdds		/f/bx
430117900Sdds	'
431167549Sdds	# POSIX does not say that this should work,
432167549Sdds	# but it does for GNU, BSD, and SunOS
433167549Sdds	mark '8.17' ; $SED -e 's/[/]/Q/' lines1
4341590Srgrimes}
4351590Srgrimes
4361590Srgrimestest_error()
4371590Srgrimes{
438167555Sdds	COMMENT='Error cases'
439167555Sdds	mark '9.1' ; $SED -x 2>/dev/null ; echo $?
440167555Sdds	mark '9.2' ; $SED -f 2>/dev/null ; echo $?
441167555Sdds	mark '9.3' ; $SED -e 2>/dev/null ; echo $?
442167555Sdds	mark '9.4' ; $SED -f /dev/xyzzyxyzy 2>/dev/null ; echo $?
443167555Sdds	mark '9.5' ; $SED p /dev/xyzzyxyzy 2>/dev/null ; echo $?
444167555Sdds	mark '9.6' ; $SED -f /bin/sh 2>/dev/null ; echo $?
445167555Sdds	mark '9.7' ; $SED '{' 2>/dev/null ; echo $?
446167555Sdds	mark '9.8' ; $SED '{' 2>/dev/null ; echo $?
447167555Sdds	mark '9.9' ; $SED '/hello/' 2>/dev/null ; echo $?
448167555Sdds	mark '9.10' ; $SED '1,/hello/' 2>/dev/null ; echo $?
449167555Sdds	mark '9.11' ; $SED -e '-5p' 2>/dev/null ; echo $?
450167555Sdds	mark '9.12' ; $SED '/jj' 2>/dev/null ; echo $?
451167555Sdds	mark '9.13' ; $SED 'a hello' 2>/dev/null ; echo $?
452167555Sdds	mark '9.14' ; $SED 'a \ hello' 2>/dev/null ; echo $?
453167555Sdds	mark '9.15' ; $SED 'b foo' 2>/dev/null ; echo $?
454167555Sdds	mark '9.16' ; $SED 'd hello' 2>/dev/null ; echo $?
455167555Sdds	mark '9.17' ; $SED 's/aa' 2>/dev/null ; echo $?
456167555Sdds	mark '9.18' ; $SED 's/aa/' 2>/dev/null ; echo $?
457167555Sdds	mark '9.19' ; $SED 's/a/b' 2>/dev/null ; echo $?
458167555Sdds	mark '9.20' ; $SED 's/a/b/c/d' 2>/dev/null ; echo $?
459167555Sdds	mark '9.21' ; $SED 's/a/b/ 1 2' 2>/dev/null ; echo $?
460167555Sdds	mark '9.22' ; $SED 's/a/b/ 1 g' 2>/dev/null ; echo $?
461167555Sdds	mark '9.23' ; $SED 's/a/b/w' 2>/dev/null ; echo $?
462167555Sdds	mark '9.24' ; $SED 'y/aa' 2>/dev/null ; echo $?
463167555Sdds	mark '9.25' ; $SED 'y/aa/b/' 2>/dev/null ; echo $?
464167555Sdds	mark '9.26' ; $SED 'y/aa/' 2>/dev/null ; echo $?
465167555Sdds	mark '9.27' ; $SED 'y/a/b' 2>/dev/null ; echo $?
466167555Sdds	mark '9.28' ; $SED 'y/a/b/c/d' 2>/dev/null ; echo $?
467167555Sdds	mark '9.29' ; $SED '!' 2>/dev/null ; echo $?
468167555Sdds	mark '9.30' ; $SED supercalifrangolisticexprialidociussupercalifrangolisticexcius 2>/dev/null ; echo $?
469167555Sdds	mark '9.31' ; $SED '' /dev/null 2>/dev/null ; echo $?
4701590Srgrimes}
4711590Srgrimes
4721590Srgrimesmain
473