I have this command that I'm trying to execute in the bourne shell for Solaris 9.
find ${DATADIR} -name "check_*" -type f -exec sh -c '$0 | ${PARSEDATA}' {} \; >> ${TMP_1}
My problem is, the variable ${PARSEDATA}
won't work properly, I have tried using double quotes around it, then the problem is $0
is the name of the script executing this code, not the file located using the find
command.
Any suggestions to solve this, probably easy problem, is greatly helpful.
Thanks in advance.
Update: $0
is the name of the script located using the find
command, the variable for ${PARSEDATA}
is a filter, located somewhere on the system that modifies the output of each located script. However, the problem is, I can't seem to get both $0
and ${PARSEDATA}
to expand properly, either $0
expands fine using single quotes, or using double qoutes ${PARSEDATA}
expands fine, but then $0
becomes the name of the orginal script that runs this find
-command.