added QSE_SED_EXTENDEDADR

deleted QSE_SED_ZEROA1 and QSE_SED_STARTSTEP
added actual code for more ~extended address formats
fixed the 'divide-by-zero' bug caused by the command 'start~0'
added more test scripts for sed
This commit is contained in:
2011-09-29 00:31:17 +00:00
parent 84cb2b81d8
commit 7a246a02ef
13 changed files with 250 additions and 33 deletions

View File

@ -9,4 +9,6 @@ EXTRA_DIST = \
s003.sed s003.dat \
s004.sed s004.dat \
s005.sed s005.dat \
s006.sed s006.dat
s006.sed s006.dat \
s007.sed s007.dat \
s008.sed s006.dat

View File

@ -205,7 +205,9 @@ EXTRA_DIST = \
s003.sed s003.dat \
s004.sed s004.dat \
s005.sed s005.dat \
s006.sed s006.dat
s006.sed s006.dat \
s007.sed s007.dat \
s008.sed s006.dat
all: all-am

View File

@ -81,3 +81,43 @@ ADDRESS: 45.34.34.33
4
-------------------
5
--------------------------------------------------------------------------------
[CMD] qsesed -f s007.sed s007.dat </dev/stdin 2>&1
--------------------------------------------------------------------------------
# copy binaries to ramdisk
cp -a /bin/* /ramdisk/busybin/
echo -n "done${CRE}"
#COPY DISK TO /ramdisk/cdrom
if [ -n "$FROMINIT" ];then
cp -af /image/* /ramdisk/cdrom/
fi
# copy binaries again to ramdisk
cp -a /bin/* /ramdisk/busybin/
echo -n "done${CRE}"
#COPY DISK TO /ramdisk/cdrom
if [ -n "$FROMINIT" ];then
cp -af /image/* /ramdisk/cdrom/
fi
--------------------------------------------------------------------------------
[CMD] qsesed -w -f s008.sed s008.dat </dev/stdin 2>&1
--------------------------------------------------------------------------------
# copy binaries to ramdisk
cp -a /bin/* /ramdisk/busybin/
echo -n "done${CRE}"
#COPY DISK TO /ramdisk/cdrom
if [ -n "$FROMINIT" ];then
cp -af /image/* /ramdisk/cdrom/
fi
# copy binaries again to ramdisk
cp -a /bin/* /ramdisk/busybin/
echo -n "done${CRE}"
#COPY DISK TO /ramdisk/cdrom
if [ -n "$FROMINIT" ];then
cp -af /image/* /ramdisk/cdrom/
fi

View File

@ -81,3 +81,43 @@ ADDRESS: 45.34.34.33
4
-------------------
5
--------------------------------------------------------------------------------
[CMD] qsesed -m 500000 -f s007.sed s007.dat </dev/stdin 2>&1
--------------------------------------------------------------------------------
# copy binaries to ramdisk
cp -a /bin/* /ramdisk/busybin/
echo -n "done${CRE}"
#COPY DISK TO /ramdisk/cdrom
if [ -n "$FROMINIT" ];then
cp -af /image/* /ramdisk/cdrom/
fi
# copy binaries again to ramdisk
cp -a /bin/* /ramdisk/busybin/
echo -n "done${CRE}"
#COPY DISK TO /ramdisk/cdrom
if [ -n "$FROMINIT" ];then
cp -af /image/* /ramdisk/cdrom/
fi
--------------------------------------------------------------------------------
[CMD] qsesed -m 500000 -w -f s008.sed s008.dat </dev/stdin 2>&1
--------------------------------------------------------------------------------
# copy binaries to ramdisk
cp -a /bin/* /ramdisk/busybin/
echo -n "done${CRE}"
#COPY DISK TO /ramdisk/cdrom
if [ -n "$FROMINIT" ];then
cp -af /image/* /ramdisk/cdrom/
fi
# copy binaries again to ramdisk
cp -a /bin/* /ramdisk/busybin/
echo -n "done${CRE}"
#COPY DISK TO /ramdisk/cdrom
if [ -n "$FROMINIT" ];then
cp -af /image/* /ramdisk/cdrom/
fi

View File

@ -62,6 +62,8 @@ PROGS="
s004.sed/s004.dat//
s005.sed/s005.dat//
s006.sed/s006.dat//
s007.sed/s007.dat//
s008.sed/s008.dat//-w
"
[ -x "${QSESED}" ] ||

9
qse/regress/sed/s007.dat Normal file
View File

@ -0,0 +1,9 @@
# copy binaries to ramdisk
cp -a /bin/* /ramdisk/busybin/
echo -n "done${CRE}"
# copy binaries again to ramdisk
cp -a /bin/* /ramdisk/busybin/
echo -n "done${CRE}"

18
qse/regress/sed/s007.sed Normal file
View File

@ -0,0 +1,18 @@
#
# Taken from message #8918 by Davide Brini in the sed-users mailing list
#
$!N
\|^cp -a /bin/\* /ramdisk/busybin/\necho -n "done\${CRE}"$| {
s|$|\
#COPY DISK TO /ramdisk/cdrom\
if [ -n "$FROMINIT" ];then\
cp -af /image/* /ramdisk/cdrom/\
fi|
p
d
}
P
D

9
qse/regress/sed/s008.dat Normal file
View File

@ -0,0 +1,9 @@
# copy binaries to ramdisk
cp -a /bin/* /ramdisk/busybin/
echo -n "done${CRE}"
# copy binaries again to ramdisk
cp -a /bin/* /ramdisk/busybin/
echo -n "done${CRE}"

11
qse/regress/sed/s008.sed Normal file
View File

@ -0,0 +1,11 @@
#
# Taken from message #8926 by nburns1980 in the sed-users mailing list
#
\|cp -a /bin/\* /ramdisk/busybin/|,+1 {
//n
\|echo -n "done\${CRE}"| a\
#COPY DISK TO /ramdisk/cdrom\
if [ -n "$FROMINIT" ];then\
cp -af /image/* /ramdisk/cdrom/\
fi
}