bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: findutils & textutils updates/bug fixes


From: Padraig Brady
Subject: Re: findutils & textutils updates/bug fixes
Date: Mon, 18 Jun 2001 13:26:02 +0100
User-agent: Mozilla/5.0 (X11; U; Linux 2.4.0-ac4 i686; en-US; rv:0.9.1) Gecko/20010607

related to the patch for #1 I sent I forgot
to include documentation for %D option
in the find.1 man page. Can you plesase
make the necessary edit.

Also attached is an unrelated documentation
fix to find.texi. Should be obvious, though you
may want to change the wording.

cheers,
Padraig.

Kevin Dalley wrote:

#1 sounds like a good idea.

#2  seems reasonable as well.

I'm not sure about #3 yet.  That changes things somewhat.  Let me
think about it.  I'm trying to fix a number of bugs in findutils, and
have an alpha release available in
ftp://alpha.gnu.org/gnu/findutils-4.1.7.tar.gz
I'll consider adding features in a while.

Thanks for the suggestions.

Padraig Brady <address@hidden> writes:

Hi,
I've a few small patches here which I think are definitely required.

1: findutils

a: find (%D printf specifier added) which prints the device id
associated
   with a file. This (in conjunction with the inode number) allows you
   to uniquely identify any file on the system, which is
useful/required
   for many applications.

b: xargs doesn't ignore "empty" arguments when -0 used (I.E. '\0' is
delimiter).
   You can test this like:

   address@hidden:~$ echo -ne "1\n\n\n2" | xargs -n1 | od -t x1
   0000000 31 0a 32 0a
   address@hidden:~$ echo -ne "1\000\000\0002" | xargs -0 -n1 | od
-t x1
   0000000 31 0a 0a 0a 32 0a

   As you can see the first command works as expected, whereas the
second doesn't.
   In summary multiple consequtive '\0's should be squeezed to 1 '\0'

c: Related to b: xargs should have an option to group arguments passed
to commands
   by 2 or more delimeters, i.e: you should be able to do:

   address@hidden:~$ echo -ne "1\n2\n3\n\na\nb\nc\n" | xargs -nn
   1 2 3
   a b c
   address@hidden:~$



diff -aru -x *.o findutils-4.1.7/doc/find.texi findutils-pb/doc/find.texi
--- findutils-4.1.7/doc/find.texi       Mon Oct  9 22:58:25 2000
+++ findutils-pb/doc/find.texi  Sat Jun 16 16:28:38 2001
@@ -1073,13 +1073,16 @@
 @subsection Format Directives
 
 @samp{-printf} and @samp{-fprintf} support the following format
-directives to print information about the file being processed.  Unlike
-the C @code{printf} function, they do not support field width specifiers.
+directives to print information about the file being processed.
+The C @code{printf} function, field width and precision specifiers
+are supported, as applied to string (%s) types. I.E. you can specify
+"minimum field width"."maximum field width" for each directive.
 
 @samp{%%} is a literal percent sign.  A @samp{%} character followed by
-any other character is discarded (but the other character is printed),
-and a warning message is printed to the standard error output (because
-it was probably a typo).
+an unrecognised character (i.e. not a known directive or printf field
+width and precision specifier), is discarded (but the unrecognised character
+is printed), and a warning message is printed to the standard error output
+(because it was probably a typo).
 
 @menu
 * Name Directives::

reply via email to

[Prev in Thread] Current Thread [Next in Thread]