--- exec-wrapper.in.orig	2009-05-24 22:03:21.000000000 -0500
+++ exec-wrapper.in	2010-02-09 19:08:34.000000000 -0600
@@ -36,7 +36,7 @@
 # stdout - escaped string.
 strToOct()
 {
-	printf "%s" "${1}" | od -v -A n -t o1 | \
+	printf "%s" "${1}" | od -v -A n -t o1 | tr -d "\n" | \
 			sed "s/ *\([0-9]*\) */\\\\\1/g" | tr -d "\n"
 }
 
@@ -88,7 +88,7 @@
 		printf "\textern char **environ;\n"
 
 		# Set environment variables.
-		for i in $( seq $OPT_ENV_NUM ); do
+		for i in $( gseq $OPT_ENV_NUM ); do
 			printf "\tif (putenv(\""
 			eval strToOct \"\${OPT_ENV_$i}\"
 			printf "\"))\n"
@@ -96,7 +96,7 @@
 		done
 
 		# Unset environment variables.
-		for i in $( seq $OPT_UENV_NUM ); do
+		for i in $( gseq $OPT_UENV_NUM ); do
 			printf "\tif (unsetenv(\""
 			eval strToOct \"\${OPT_UENV_$i}\"
 			printf "\"))\n"
@@ -114,7 +114,7 @@
 
 		printf "\tnew_argv[0] = argv[0];\n"
 
-		for i in $( seq $OPT_ARG_NUM ); do
+		for i in $( gseq $OPT_ARG_NUM ); do
 			printf "\tnew_argv[%s] = \"" $i
 			eval strToOct \"\${OPT_ARG_$i}\"
 			printf "\";\n"