1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-18 01:18:51 +02:00

merge with 1.8.1g

This commit is contained in:
Jim Meyering
1993-10-17 03:57:04 +00:00
parent 6e1a4cca68
commit fa7a1e19e2
20 changed files with 800 additions and 122 deletions
+24 -7
View File
@@ -145,7 +145,7 @@ main (argc, argv, envp)
case 'u':
break;
default:
usage ();
usage (2);
}
}
@@ -156,7 +156,7 @@ main (argc, argv, envp)
}
if (show_help)
usage ();
usage (0);
if (optind != argc && !strcmp (argv[optind], "-"))
ignore_environment = 1;
@@ -192,11 +192,28 @@ main (argc, argv, envp)
}
static void
usage ()
usage (status)
int status;
{
fprintf (stderr, "\
Usage: %s [{--help,--version}] [-] [-i] [-u name] [--ignore-environment]\n\
[--unset=name] [name=value]... [command [args...]]\n",
fprintf (status == 0 ? stdout : stderr, "\
Usage: %s [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]\n\
",
program_name);
exit (2);
if (status != 0)
fprintf (stderr, "\nTry `%s --help' for more information.\n",
program_name);
else
printf ("\
\n\
-u, --unset NAME remove variable from the environment\n\
-i, --ignore-environment start with an empty environment\n\
--help display this help and exit\n\
--version output version information and exit\n\
\n\
A mere - implies -i. If no COMMAND, print the resulting environment.\n\
");
exit (status);
}