find : bad status--

find : bad status--

Post by essai » Fri, 25 Apr 2003 20:19:24



Hye all,

I'm working with ksh, on an AIX 5.0 OS.

Using find in a ksh script, i get a bad status issue.
Using on a term the find command printed before execution, the job is
done without any complain.

- script begins --------------------------------------------------
#! /bin/ksh

srcAppRootDir="/tmp"
findAppFilter="\( ! -name \"runmvt.ksh\" -a ! -name \"chgmvt.ksh\" \)"

print find ${srcAppRootDir} "${findAppFilter}" -print
find ${srcAppRootDir} "${findAppFilter}" -print 1> /dev/null
- script ends ----------------------------------------------------

- output begins --------------------------------------------------
$ test.ksh
find /tmp \( ! -name "runmvt.ksh" -a ! -name "chgmvt.ksh" \) -print
find: bad status-- \( ! -name "runmvt.ksh" -a ! -name "chgmvt.ksh" \)
$ echo $?
1
$ find /tmp \( ! -name "runmvt.ksh" -a ! -name "chgmvt.ksh" \) -print
1> /dev/null
$ echo $?
0
$
- output ends ----------------------------------------------------

Any suggestion will be welcomed ;)

 
 
 

find : bad status--

Post by Stephane CHAZELA » Fri, 25 Apr 2003 21:00:44


[...]
Quote:> srcAppRootDir="/tmp"
> findAppFilter="\( ! -name \"runmvt.ksh\" -a ! -name \"chgmvt.ksh\" \)"
[...]
> print find ${srcAppRootDir} "${findAppFilter}" -print
> find ${srcAppRootDir} "${findAppFilter}" -print 1> /dev/null

[...]

Either:

srcAppRootDir="/tmp"
findAppFilter="\( ! -name \"runmvt.ksh\" -a ! -name \"chgmvt.ksh\" \)"
eval 'find "$srcAppRootDir" '"$findAppFilter -print"

Or:

srcAppRootDir="/tmp"
findAppFilter="( ! -name runmvt.ksh -a ! -name chgmvt.ksh )"
set -f
find "$srcAppRootDir" $findAppFilter -print

Or:

IFS=,
srcAppRootDir="/tmp"
findAppFilter="(,!,-name,runmvt.ksh,-a,!,-name,chgmvt.ksh,)"
set -f
find "$srcAppRootDir" $findAppFilter -print

--
Stphane

 
 
 

1. find giving bad status?

For the past few months, whenever I do a 'find', I get a whole bunch of
lines like the following:

find: bad status-- /usr/preserve
find: bad status-- /usr/pub
find: bad status-- /usr/spool
find: bad status-- /usr/ucb

It doesn't seem to make any difference what the 'find' is doing.  Any guesses
as to what's causing this?  
(Configuration:  NCR Tower/450 running SVR2)
------------------------------------------------------------------------------
Michael Nolan                              "Software means never having
Tailored Software Services, Inc.            to say you're finished."      
Lincoln, Nebraska (402) 423-1490            --J. D. Hildebrand in UNIX REVIEW
UUCP:      tssi!nolan (or try sparky!dsndata!tssi!nolan)

2. Password protect dirs

3. find problem -- bad status

4. 2 computer network from Wi-Fi

5. Bad Status with find on jfs

6. Forcing a link to libc5 under RedHar 5.1 ?

7. Finding out if there are bad blocks in the bad blocks list

8. New logo in build 72 of S10

9. bad nfs status return value: 116

10. 2.4.21-rc : lost interrupt/bad DMA status

11. nfs_stat_to_errno: bad nfs status return value: 116

12. svgalib + sound = hda:bad DMA status ??