(usage): Add examples.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Apr 2005 22:21:50 +0000 (22:21 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Apr 2005 22:21:50 +0000 (22:21 +0000)
src/basename.c
src/cat.c
src/chgrp.c
src/chown.c
src/dirname.c

index 13cdfa3..9c925a3 100644 (file)
@@ -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);
index ba86adc..99064ca 100644 (file)
--- 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);
index fee3aa5..9f99854 100644 (file)
@@ -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);
index ba0a08b..5805442 100644 (file)
@@ -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);
index 5c9ab9e..5450278 100644 (file)
@@ -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);