if [[ ! -z grep echo "${prof}" | cut -d. -f1 dm_smear.dat ]]
This gives me the following error. I am trying to find a string ${prof} in a file dm_smear.dat and if that exists in the file I will do certain operations
: syntax error in conditional expression
: syntax error near `1`'
: ` if [[ ! -z grep `echo "${prof}" | cut -d . -f 1` dm_smear.dat ]]'
${prof}contain? Given the amount if syntax errors and misconceptions in this short piece of code, you'd probably better explain exactly what should happen instead of have us guess.ifstatement is not a loop.