Discussion:
Problems with find command in shell script
(too old to reply)
Thomas Spenner
2003-07-02 12:21:53 UTC
Permalink
hi all,
the following find- command works when starting it by hand:

find /home/opc_op -type f -name ABC*.txt -print | xargs grep =
/dev/null | awk -f /home/opc_op/XYZ.awk

but i want it to be started by template as a shell script in OV...
shellscript looks like that:

#! /bin/sh
find /home/opc_op -type f -name dd*.txt -print | xargs grep =
/dev/null | awk -f /home/opc_op/ts_statistik.awk

know the output of shellscript ist like this:
Output:
find: missing conjunction

As said, when entering the command by hand, it works...

is there someone who can help?
Mike Stroyan
2003-07-03 19:53:44 UTC
Permalink
Thomas Spenner <***@siemens.com> wrote:

|but i want it to be started by template as a shell script in OV...
|shellscript looks like that:

|#! /bin/sh
|find /home/opc_op -type f -name dd*.txt -print | xargs grep /dev/null | awk -f /home/opc_op/ts_statistik.awk

|know the output of shellscript ist like this:
|Output:
|find: missing conjunction

You need to quote 'dd*.txt' in order to prevent it from being expanded
when there are files matching that pattern. It is probably expanding to
multiple file names. That could cause the "missing conjuction"
complaint.
--
Mike Stroyan, ***@hp.com
Loading...