Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Mar 1999 15:52:02 -0500
From:      Glen Mann <gmann@cyberia.com>
To:        questions@freebsd.org
Subject:   find usage in shell script
Message-ID:  <36E82CF2.F47BE244@cyberia.com>

next in thread | raw e-mail | index | archive | help

Hello all-

Can somebody explain why I can do this on the command line

find ./data -type f -exec chown nobody {} \; \
                    -exec chgrp nogroup {} \; \
                    -exec chmod 664 {} \;

But not in a Bourne shell script?  When I run the script with the backslashes
to break up the command to make it readable, I get this

  # ./fix_perms
  find: : unknown option
  -exec: not found
  #

Where is the second colon on the find: error line coming from?  To get around
this, I have everything on a single line in the script, but that's not very
"pretty!"  :)

Thanks
-Glen


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36E82CF2.F47BE244>