Subject: Re: multi find with different file outputs
To: None <>
From: Jeremy C. Reed <>
List: tech-userlevel
Date: 10/06/2005 13:36:39
On Thu, 6 Oct 2005, Jeremy C. Reed wrote:

> ? usr.bin/find/)
> This parenthesis file above was created by forgetting to put in file name 
> after -fprint. find(1) still errored because of now missing unbalanced ")". 
> Should I care about this?

This is the same behaviour as GNU find:

montecristo:~/src$ find /etc \( -name "*p*" -fprint \)
find: invalid expression
montecristo:~/src$ ls -l \)
-rw-r--r--    1 reed     reed            0 Oct  6 13:33 )

> Now creating file at expression parsing time, creates files even if the 
> find(1) expressions end up erroring out. For example:
> rainier:/usr/src/src/usr.bin/find$ ./find /etc -fprint ABC -junk
> find: -junk: unknown option
> rainier:/usr/src/src/usr.bin/find$ ls -l ABC
> -rw-r--r--  1 reed  wsrc  0 Oct  6 13:25 ABC
> Is the above okay behaviour?

This is same behaviour as GNU find.

montecristo:~/src$ find /etc -name "*p*" -fprint ABC -bogus
find: invalid predicate `-bogus'
montecristo:~/src$ ls -l ABC
-rw-r--r--    1 reed     reed            0 Oct  6 13:32 ABC

> -SRCS=	find.c function.c ls.c main.c misc.c operator.c option.c stat_flags.c
> +SRCS=	find.c function.c ls.c main.c misc.c operator.c option.c 
> ../../bin/ls/stat_flags.c

Ignore that -- it is not part of my code to commit.

I will add -fprintx and -fprint0 later ...

  Jeremy C. Reed

  	  	 	 technical support & remote administration