File:  [parser3project] / parser3 / tests / cat.sh
Revision 1.4: download - view: text, annotated - select for diffs - revision graph
Tue Oct 22 02:46:46 2024 UTC (19 months, 1 week ago) by moko
Branches: MAIN
CVS tags: HEAD
tests updated after ^file::exec[cmd;;$array] implemented and empty arguments not skipped (related to feature #1252)

#!/bin/sh

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

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

if [ $1 = "args" ]
then
	for arg in "$@"; do
		echo -n "\"$arg\" "
	done
	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: