From: Paul Eggert Date: Tue, 5 Apr 2005 22:21:50 +0000 (+0000) Subject: (usage): Add examples. X-Git-Tag: CPPI-1_12~1099 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e8a0c946f53a3e01fd9113252a25d27b39648aab;p=platform%2Fupstream%2Fcoreutils.git (usage): Add examples. --- diff --git a/src/basename.c b/src/basename.c index 13cdfa3..9c925a3 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); diff --git a/src/cat.c b/src/cat.c index ba86adc..99064ca 100644 --- a/src/cat.c +++ b/src/cat.c @@ -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 fee3aa5..9f99854 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 ba0a08b..5805442 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 5c9ab9e..5450278 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);