diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-04-05 22:21:50 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-04-05 22:21:50 +0000 |
commit | e8a0c946f53a3e01fd9113252a25d27b39648aab (patch) | |
tree | abbc3fbd83a2b3d4fc0446daa027385843e86c28 | |
parent | 10b4a29f6410ed386a38a4d65512a0fd738446f0 (diff) | |
download | coreutils-e8a0c946f53a3e01fd9113252a25d27b39648aab.tar.xz |
(usage): Add examples.
-rw-r--r-- | src/basename.c | 9 | ||||
-rw-r--r-- | src/cat.c | 9 | ||||
-rw-r--r-- | src/chgrp.c | 7 | ||||
-rw-r--r-- | src/chown.c | 8 | ||||
-rw-r--r-- | src/dirname.c | 11 |
5 files changed, 41 insertions, 3 deletions
diff --git a/src/basename.c b/src/basename.c index 13cdfa3fd..9c925a38d 100644 --- a/src/basename.c +++ b/src/basename.c @@ -1,5 +1,5 @@ /* basename -- strip directory and suffix from filenames - Copyright (C) 1990-1997, 1999-2004 Free Software Foundation, Inc. + Copyright (C) 1990-1997, 1999-2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -64,6 +64,13 @@ If specified, also remove a trailing SUFFIX.\n\ "), stdout); fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); + printf (_("\ +\n\ +Examples:\n\ + %s /usr/bin/sort Output \"sort\".\n\ + %s include/stdio.h .h Output \"stdio\".\n\ +"), + program_name, program_name); printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } exit (status); @@ -1,5 +1,5 @@ /* cat -- concatenate files and print on the standard output. - Copyright (C) 88, 90, 91, 1995-2004 Free Software Foundation, Inc. + Copyright (C) 88, 90, 91, 1995-2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -118,6 +118,13 @@ With no FILE, or when FILE is -, read standard input.\n\ -B, --binary use binary writes to the console device.\n\n\ "), stdout); #endif + printf (_("\ +\n\ +Examples:\n\ + %s f - g Output f's contents, then standard input, then g's contents.\n\ + %s Copy standard input to standard output.\n\ +"), + program_name, program_name); printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } exit (status); diff --git a/src/chgrp.c b/src/chgrp.c index fee3aa58c..9f998547a 100644 --- a/src/chgrp.c +++ b/src/chgrp.c @@ -153,6 +153,13 @@ one takes effect.\n\ "), stdout); fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); + printf (_("\ +\n\ +Examples:\n\ + %s staff /u Change the group of /u to \"staff\".\n\ + %s -hR staff /u Change the group of /u and subfiles to \"staff\".\n\ +"), + program_name, program_name); printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } exit (status); diff --git a/src/chown.c b/src/chown.c index ba0a08b56..58054427c 100644 --- a/src/chown.c +++ b/src/chown.c @@ -148,6 +148,14 @@ Owner is unchanged if missing. Group is unchanged if missing, but changed\n\ to login group if implied by a `:' following a symbolic OWNER.\n\ OWNER and GROUP may be numeric as well as symbolic.\n\ "), stdout); + printf (_("\ +\n\ +Examples:\n\ + %s root /u Change the owner of /u to \"root\".\n\ + %s root:staff /u Likewise, but also change its group to \"staff\".\n\ + %s -hR root /u Change the owner of /u and subfiles to \"root\".\n\ +"), + program_name, program_name, program_name); printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } exit (status); diff --git a/src/dirname.c b/src/dirname.c index 5c9ab9ef7..5450278e2 100644 --- a/src/dirname.c +++ b/src/dirname.c @@ -1,5 +1,7 @@ /* dirname -- strip filename suffix from pathname - Copyright (C) 1990-1997, 1999-2002, 2004 Free Software Foundation, Inc. + + Copyright (C) 1990-1997, 1999-2002, 2004, 2005 Free Software + Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -56,6 +58,13 @@ output `.' (meaning the current directory).\n\ "), stdout); fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); + printf (_("\ +\n\ +Examples:\n\ + %s /usr/bin/sort Output \"/usr/bin\".\n\ + %s stdio.h Output \".\".\n\ +"), + program_name, program_name); printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } exit (status); |