--n-class X -> --X
authorJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 5 Apr 2011 18:06:26 +0000 (20:06 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 5 Apr 2011 18:06:26 +0000 (20:06 +0200)
bin/n

diff --git a/bin/n b/bin/n
index 6433d68..efefd5c 100755 (executable)
--- a/bin/n
+++ b/bin/n
@@ -4,9 +4,9 @@ if which ionice &>/dev/null;then
 else
        IONICE=""
 fi
-if [ "$1" = --n-class ];then
-  CGPARAM="$2"
-  shift 2
+if [ "${1#--}" != "$1" ];then
+  CGPARAM="${1#--}"
+  shift
 else
   CGPARAM="n"
 fi