Index: ChangeLog =================================================================== RCS file: /cvsroot/coreutils/coreutils/ChangeLog,v retrieving revision 1.1287 diff -u -r1.1287 ChangeLog --- ChangeLog 6 May 2005 17:57:59 -0000 1.1287 +++ ChangeLog 8 May 2005 17:58:56 -0000 @@ -1,3 +1,8 @@ +2005-05-07 Dave Gilbert + + * chmod.c, chroot.c, cksum.c, comm.c, cp.c, csplit.c, + cut.c, date.c, dd.c, df.c: Add examples + 2005-05-06 Paul Eggert * Version 5.3.1. Index: src/chmod.c =================================================================== RCS file: /cvsroot/coreutils/coreutils/src/chmod.c,v retrieving revision 1.110 diff -u -r1.110 chmod.c --- src/chmod.c 4 May 2005 17:22:25 -0000 1.110 +++ src/chmod.c 8 May 2005 17:58:57 -0000 @@ -350,6 +350,16 @@ \n\ Each MODE is of the form `[ugoa]*([-+=]([rwxXst]*|[ugo]))+'.\n\ "), stdout); + printf (_("\ +\n\ +Examples:\n\ + %s +x afile Make 'afile' executable.\n\ + %s g+r afile Make 'afile' readable by members of its group.\n\ + %s o-r afile Remove read access for everyone outside the group.\n\ + %s 600 afile Make 'afile' readable and writeable by the owner only.\n\ + %s -R a+w adir Directory 'adir' & all children made writeable by all.\n\ +"), + program_name, program_name, program_name, program_name, program_name); printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } exit (status); Index: src/chroot.c =================================================================== RCS file: /cvsroot/coreutils/coreutils/src/chroot.c,v retrieving revision 1.48 diff -u -r1.48 chroot.c --- src/chroot.c 17 Nov 2004 00:56:25 -0000 1.48 +++ src/chroot.c 8 May 2005 17:58:57 -0000 @@ -57,6 +57,14 @@ \n\ If no command is given, run ``${SHELL} -i'' (default: /bin/sh).\n\ "), stdout); + printf (_("\ +\n\ +Examples:\n\ + %s /mnt/new Start a new shell with '/mnt/new' as its root.\n\ + %s /mnt/new bin/prog Run 'bin/prog' with '/mnt/new' as its root.\n\ +"), + program_name, program_name); + printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } exit (status); Index: src/cksum.c =================================================================== RCS file: /cvsroot/coreutils/coreutils/src/cksum.c,v retrieving revision 1.74 diff -u -r1.74 cksum.c --- src/cksum.c 6 Mar 2005 16:30:57 -0000 1.74 +++ src/cksum.c 8 May 2005 17:58:57 -0000 @@ -277,6 +277,14 @@ "), stdout); fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); + printf (_("\ +\n\ +Examples:\n\ + %s afile Print CRC checksum and byte count for 'afile'.\n\ + %s afile bfile Print separate checksums and byte counts for each file.\n\ +"), + program_name, program_name); + printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } exit (status); Index: src/comm.c =================================================================== RCS file: /cvsroot/coreutils/coreutils/src/comm.c,v retrieving revision 1.81 diff -u -r1.81 comm.c --- src/comm.c 12 Apr 2005 06:46:10 -0000 1.81 +++ src/comm.c 8 May 2005 17:58:57 -0000 @@ -92,6 +92,14 @@ "), stdout); fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); + printf (_("\ +\n\ +Examples:\n\ + %s file1 file2 Compare presorted files; display unique and common lines.\n\ + %s -1 -2 f1 f2 List lines common to both files.\n\ + %s -3 f1 f2 List lines unique to either file.\n\ +"), + program_name, program_name, program_name); printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } exit (status); Index: src/cp.c =================================================================== RCS file: /cvsroot/coreutils/coreutils/src/cp.c,v retrieving revision 1.206 diff -u -r1.206 cp.c --- src/cp.c 28 Mar 2005 17:49:12 -0000 1.206 +++ src/cp.c 8 May 2005 17:58:58 -0000 @@ -253,6 +253,16 @@ options are given and SOURCE and DEST are the same name for an existing,\n\ regular file.\n\ "), stdout); + printf (_("\ +\n\ +Examples:\n\ + %s a n Make a copy of 'a' with the name 'n'.\n\ + %s a d Copy 'a' as a new file 'a' in the existing directory 'd'.\n\ + %s -a d1 d2 Copy directory 'd1' and its children into 'd2/d1'.\n\ + %s -ax d1 d2 As above but make sure to stay in the same filesystem.\n\ +"), + program_name, program_name, program_name, program_name); + printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } exit (status); Index: src/csplit.c =================================================================== RCS file: /cvsroot/coreutils/coreutils/src/csplit.c,v retrieving revision 1.137 diff -u -r1.137 csplit.c --- src/csplit.c 11 Apr 2005 20:07:00 -0000 1.137 +++ src/csplit.c 8 May 2005 17:58:58 -0000 @@ -1493,6 +1493,13 @@ \n\ A line OFFSET is a required `+' or `-' followed by a positive integer.\n\ "), stdout); + printf (_("\ +\n\ +Examples:\n\ + %s -z mailfile '/^From /' {*} Split a mail file, 1 message per file.\n\ + %s -f'message' -b'%%08d' ...... Add to above to name messages sensibly.\n\ +"), + program_name, program_name); printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } exit (status); Index: src/cut.c =================================================================== RCS file: /cvsroot/coreutils/coreutils/src/cut.c,v retrieving revision 1.121 diff -u -r1.121 cut.c --- src/cut.c 28 Mar 2005 18:01:04 -0000 1.121 +++ src/cut.c 8 May 2005 17:58:58 -0000 @@ -232,6 +232,15 @@ \n\ With no FILE, or when FILE is -, read standard input.\n\ "), stdout); + printf (_("\ +\n\ +Examples:\n\ + %s -d':' -f1 afile Print 1st field of each line of a : separated file.\n\ + %s -b2-5 afile Print 2nd to 5th bytes of each line of 'afile'.\n\ + %s -d',' -f1,5 afile Print 1st and 5th fields of a comma separated file.\n\ + %s -f3- afile Print 3rd and later fields of a tab separated file.\n\ +"), + program_name, program_name, program_name, program_name); printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } exit (status); Index: src/date.c =================================================================== RCS file: /cvsroot/coreutils/coreutils/src/date.c,v retrieving revision 1.143 diff -u -r1.143 date.c --- src/date.c 26 Apr 2005 16:40:43 -0000 1.143 +++ src/date.c 8 May 2005 17:58:58 -0000 @@ -224,6 +224,18 @@ E to use the locale's alternate representations if available, or\n\ O to use the locale's alternate numeric symbols if available.\n\ "), stdout); + printf (_("\ +\n\ +Examples:\n\ + %s Show the current date and time.\n\ + %s -I Show the date in ISO-8601 format.\n\ + %s '+%%A %%d %%B' Show as e.g. Sunday 08 May.\n\ + %s -s '8 May 2005 14:04:23' Set date to the given date and time.\n\ + %s -s '20120509 14:04:23' Set date to 9th May 2012 and time.\n\ + %s -d 20120509 -I Show the given date in ISO-8601 format.\n\ +"), + program_name, program_name, program_name, program_name, program_name, + program_name); printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } exit (status); Index: src/dd.c =================================================================== RCS file: /cvsroot/coreutils/coreutils/src/dd.c,v retrieving revision 1.179 diff -u -r1.179 dd.c --- src/dd.c 6 May 2005 17:57:10 -0000 1.179 +++ src/dd.c 8 May 2005 17:58:59 -0000 @@ -486,6 +486,16 @@ fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); + printf (_("\ +\n\ +Examples:\n\ + %s if=afile of=bfile Copy from 'afile' to 'bfile'.\n\ + %s if=/dev/zero of=af bs=1M count=10 Copy 10MiByte of zeros to 'af'.\n\ + %s if=a of=b conv=ucase Copy 'a' to 'b',convert to upper case.\n\ + %s if=a of=b ibs=1K skip=10 Copy skipping first 10KiB of input.\n\ + %s of=b obs=1 seek=50 conv=notrunc Write stdin over 'b' from 50 bytes on.\n\ +"), + program_name, program_name, program_name, program_name, program_name); printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } exit (status); Index: src/df.c =================================================================== RCS file: /cvsroot/coreutils/coreutils/src/df.c,v retrieving revision 1.163 diff -u -r1.163 df.c --- src/df.c 28 Mar 2005 17:59:54 -0000 1.163 +++ src/df.c 8 May 2005 17:58:59 -0000 @@ -743,6 +743,13 @@ SIZE may be (or may be an integer optionally followed by) one of following:\n\ kB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.\n\ "), stdout); + printf (_("\ +\n\ +Examples:\n\ + %s -h Report space usage in convenient units.\n\ + %s /a/bdir Report usage on filesystem containing '/a/bdir'.\n\ +"), + program_name, program_name); printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } exit (status);