[HPADM] weird scripting problem.



Okay, I'm at a loss. I'm trying to create a script which will go through
each group on the server and identify any file owned by that group which has
write access for either group or world (it's using the group owner because
that's how we assign responsibility)

Here is the snippet of code I'm using:

${ECHO} "Directories:" >> ${REPORT_FILE}
${ECHO} >> ${REPORT_FILE}
${FIND} / -group ${GROUP} -type d -perm -g=w -o -perm -o=w -exec ls -la
{} \\\; >>${REPORT_FILE}
${ECHO} >> ${REPORT_FILE}
${ECHO} "Files:" >> ${REPORT_FILE}
${ECHO} >> ${REPORT_FILE}
${FIND} / -group ${GROUP} -perm -g=w -o -perm -o=w -exec ls -la {} \\\;
${REPORT_FILE}

If I put an echo in front of each of the find commands, the output looks
correct:

/usr/bin/find / -group root -perm -g=w -o -perm -o=w -exec ls -la {} \;

However, it complains about exec not ending in an ";", which it clearly has
in the echo statement. Any ideas?

Also, typing the command at the command line exactly as shown in the echo
statement works just fine.
---------------------------------------------------------
Gary Paveza, Jr.
Technical Specialist - Architecture - HP CSE, SCSA
(302) 252-4831 - phone



--
---> Please post QUESTIONS and SUMMARIES only!! <---
To subscribe/unsubscribe to this list, contact majordomo@xxxxxxxxxxxxx
Name: hpux-admin@xxxxxxxxxxxxx Owner: owner-hpux-admin@xxxxxxxxxxxxx

Archives: ftp.dutchworks.nl:/pub/digests/hpux-admin (FTP, browse only)
http://www.dutchworks.nl/htbin/hpsysadmin (Web, browse & search)



Relevant Pages

  • RE: Sorry its not a window 2003 server .. its NT 4.0 sever!!!
    ... Now we have windows servers and some NT servers .. ... found" obviously coz i am not connected to the server. ... > For mapping a network share from the command line you have to use the "net ... > @echo off ...
    (microsoft.public.windows.server.scripting)
  • master script to keep specified number of child processes running until entire task finished
    ... multi-cpu servers, in a timely manner without swamping the server. ... I've created a kludge of a ksh that'll let me do the compress or scp ... It takes a template command with a placeholder ... echo $THE_COMMAND ...
    (comp.unix.shell)
  • Re: Sorry its not a window 2003 server .. its NT 4.0 sever!!!
    ... You should use Windows Explorer and Windows FileMananger for ... >found" obviously coz i am not connected to the server. ... >> For mapping a network share from the command line you have to use the "net ... >> echo. ...
    (microsoft.public.windows.server.scripting)
  • sed from a shell script - invalid command code
    ... all users on the server with the exception of those listed in the ... If I echo out the contents of $cmd it looks as it should do: ... trouble getting the results of the command into a variable. ...
    (freebsd-questions)
  • Re: Expect echo problem
    ... My guess would that it is the server on the other end that is doing the echo ... > The first line is the command and the two following are the response. ... > mixed up with spontanious messages from the spawed program? ...
    (comp.lang.tcl)