diff options
author | Jim Meyering <jim@meyering.net> | 1994-04-20 00:23:45 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1994-04-20 00:23:45 +0000 |
commit | e628e7bb9e1d441d35b9d429b760589e96616a2c (patch) | |
tree | 3021c0adf5a5cf4b921999f02dca7bececb07266 /src | |
parent | 33955663adecd4b67164dff735df6ff5d517900e (diff) | |
download | coreutils-e628e7bb9e1d441d35b9d429b760589e96616a2c.tar.xz |
.
Diffstat (limited to 'src')
-rw-r--r-- | src/date.c | 2 | ||||
-rw-r--r-- | src/env.c | 2 | ||||
-rwxr-xr-x | src/groups.sh | 20 | ||||
-rw-r--r-- | src/id.c | 2 | ||||
-rw-r--r-- | src/logname.c | 2 | ||||
-rw-r--r-- | src/nice.c | 2 | ||||
-rwxr-xr-x | src/nohup.sh | 26 | ||||
-rw-r--r-- | src/pathchk.c | 2 | ||||
-rw-r--r-- | src/printenv.c | 2 | ||||
-rw-r--r-- | src/sleep.c | 2 | ||||
-rw-r--r-- | src/su.c | 2 | ||||
-rw-r--r-- | src/tee.c | 2 | ||||
-rw-r--r-- | src/tty.c | 2 | ||||
-rw-r--r-- | src/uname.c | 2 | ||||
-rw-r--r-- | src/who.c | 2 | ||||
-rw-r--r-- | src/whoami.c | 2 |
16 files changed, 59 insertions, 15 deletions
diff --git a/src/date.c b/src/date.c index 3b2959565..69e866574 100644 --- a/src/date.c +++ b/src/date.c @@ -144,7 +144,7 @@ main (argc, argv) if (show_version) { - printf ("%s\n", version_string); + printf ("date - %s\n", version_string); exit (0); } @@ -151,7 +151,7 @@ main (argc, argv, envp) if (show_version) { - printf ("%s\n", version_string); + printf ("env - %s\n", version_string); exit (0); } diff --git a/src/groups.sh b/src/groups.sh index 7d8405869..bbe56aae6 100755 --- a/src/groups.sh +++ b/src/groups.sh @@ -22,6 +22,26 @@ # it to be somewhere else in PATH if not installed yet. PATH=@bindir@:$PATH +usage="Usage: $0 [OPTION]... [USERNAME]... + + --help display this help and exit + --version output version information and exit + +Same as id -Gn. If no USERNAME, use current process." + +case $# in + 1 ) + case "z${1}" in + z--help ) + echo "$usage"; exit 0 ;; + z--version ) + echo "groups - @VERSION@"; exit 0 ;; + * ) ;; + esac + ;; + * ) ;; +esac + if [ $# -eq 0 ]; then id -Gn else @@ -150,7 +150,7 @@ main (argc, argv) if (show_version) { - printf ("%s\n", version_string); + printf ("id - %s\n", version_string); exit (0); } diff --git a/src/logname.c b/src/logname.c index 413b22fcd..a7b3675fa 100644 --- a/src/logname.c +++ b/src/logname.c @@ -92,7 +92,7 @@ main (argc, argv) if (show_version) { - printf ("%s\n", version_string); + printf ("logname - %s\n", version_string); exit (0); } diff --git a/src/nice.c b/src/nice.c index a0814651f..0d3dcbb76 100644 --- a/src/nice.c +++ b/src/nice.c @@ -110,7 +110,7 @@ main (argc, argv) if (show_version) { - printf ("%s\n", version_string); + printf ("nice - %s\n", version_string); exit (0); } diff --git a/src/nohup.sh b/src/nohup.sh index 00908b5ba..3eae66747 100755 --- a/src/nohup.sh +++ b/src/nohup.sh @@ -22,11 +22,35 @@ # it to be somewhere else in PATH if not installed yet. PATH=@bindir@:$PATH +usage="Usage: $0 COMMAND [ARG]... + or: $0 OPTION" + +usage_try=" +Try \`$0 --help' for more information." + +usage_help=" + --help display this help and exit + --version output version information and exit" + if [ $# -eq 0 ]; then - echo "Usage: nohup command [arg...]" 2>&1 + echo >&2 "$usage" + echo >&2 "$usage_try" exit 1 fi +case $# in + 1 ) + case "z${1}" in + z--help ) + echo "$usage"; echo "$usage_help"; exit 0 ;; + z--version ) + echo "nohup - @VERSION@"; exit 0 ;; + * ) ;; + esac + ;; + * ) ;; +esac + trap "" 1 oldmask=`umask`; umask 077 # Only redirect the output if the user didn't already do it. diff --git a/src/pathchk.c b/src/pathchk.c index 0a0d40a7f..b509102ad 100644 --- a/src/pathchk.c +++ b/src/pathchk.c @@ -152,7 +152,7 @@ main (argc, argv) if (show_version) { - printf ("%s\n", version_string); + printf ("pathchk - %s\n", version_string); exit (0); } diff --git a/src/printenv.c b/src/printenv.c index b5e3c8940..f7118ab77 100644 --- a/src/printenv.c +++ b/src/printenv.c @@ -114,7 +114,7 @@ main (argc, argv) if (show_version) { - printf ("%s\n", version_string); + printf ("printenv - %s\n", version_string); exit (0); } diff --git a/src/sleep.c b/src/sleep.c index b7a2a1e23..7172866b8 100644 --- a/src/sleep.c +++ b/src/sleep.c @@ -99,7 +99,7 @@ main (argc, argv) if (show_version) { - printf ("%s\n", version_string); + printf ("sleep - %s\n", version_string); exit (0); } @@ -247,7 +247,7 @@ main (argc, argv) if (show_version) { - printf ("%s\n", version_string); + printf ("su - %s\n", version_string); exit (0); } @@ -122,7 +122,7 @@ main (argc, argv) if (show_version) { - printf ("%s\n", version_string); + printf ("tee - %s\n", version_string); exit (0); } @@ -94,7 +94,7 @@ main (argc, argv) if (show_version) { - printf ("%s\n", version_string); + printf ("tty - %s\n", version_string); exit (0); } diff --git a/src/uname.c b/src/uname.c index e63c2298a..4f0fda9bb 100644 --- a/src/uname.c +++ b/src/uname.c @@ -143,7 +143,7 @@ main (argc, argv) if (show_version) { - printf ("%s\n", version_string); + printf ("uname - %s\n", version_string); exit (0); } @@ -188,7 +188,7 @@ main (argc, argv) if (show_version) { - printf ("%s\n", version_string); + printf ("who - %s\n", version_string); exit (0); } diff --git a/src/whoami.c b/src/whoami.c index 833ae1421..68d715350 100644 --- a/src/whoami.c +++ b/src/whoami.c @@ -99,7 +99,7 @@ main (argc, argv) if (show_version) { - printf ("%s\n", version_string); + printf ("whoami - %s\n", version_string); exit (0); } |