I have a command findthat finds files with a name that matches several patterns mentioned in the parameter-name
find -L . \( -name "SystemOut*.log" -o -name "*.out" -o -name "*.log" -o -name "javacore*.*" \)
This finds the necessary files on the command line. I am looking to use this command in a shell script and join it with a command tarto create a tar of all log files. So, in the script, I do the following:
LIST="-name \"SystemOut*.log\" -o -name \"*.out\" -o -name \"*.log\" -o -name \"javacore*.*\" "
find -L . \( ${LIST} \)
This does not print the files I am looking for.
First, why does this script not work as a command? As soon as this happens, can I turn it on using cpioor similarly create it tarin one shot?
source
share