I have a small script that performs the following actions. I have simplified it for this example.
set logfile=$HOME/LOG/output.log
find execute.sh -type f -exec csh -c '"$1" >& "$logfile" &' {} \;
The issue is that the find command is not expanding the $logfile
value. Instead it is giving me an error
logfile: Undefined variable.
I am not that familiar with csh, nor have I done scripting for quite a while, but is it possible to escape this or otherwise gain access to the value in the command?