File:  [parser3project] / parser3 / tests / cat.sh
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Mon Nov 15 23:35:20 2010 UTC (15 years, 6 months ago) by moko
Branches: MAIN
CVS tags: release_3_4_6, release_3_4_5, release_3_4_4, release_3_4_3, release_3_4_2, release_3_4_1, HEAD
new feature: stdin arg to test $.stdin[value]

#!/bin/sh

if [ $1 = "halt" ]
then
	exit $2
fi

if [ $1 = "stdin" ]
then
	cat
	exit 0
fi

if [ $1 = "cgi" ]
then
	echo "content-type: $2
"
fi

if [ -n "$5" ]
then
	echo "$5"
fi

cat -s $3

if [ -n "$4" ]
then
	exit $4
fi


E-mail: