diff --git a/bin/epm-sh-functions b/bin/epm-sh-functions
index 402a11ea5674dc77ecbcc0a9405d650ff419f60b..1767bdb5ccd82e41c5f049e5ce217b0c6255a45b 100644
--- a/bin/epm-sh-functions
+++ b/bin/epm-sh-functions
@@ -92,7 +92,7 @@ showcmd()
 # Print command line and run command line
 docmd()
 {
-	showcmd "$@"
+	showcmd "$@$EXTRA_SHOWDOCMD"
 	"$@"
 }
 
@@ -127,6 +127,18 @@ sudocmd_foreach()
 	done
 }
 
+get_firstarg()
+{
+	echo -n "$1"
+}
+
+get_lastarg()
+{
+	local lastarg
+	eval lastarg=\${$#}
+	echo -n "$lastarg"
+}
+
 
 filter_strip_spaces()
 {