Ambiguous command

I have run the following command and getting $fout: Ambiguous.

set fout = `echo "$fnameLst" | awk '{gsub(/-dc[0-9.]*/,""); print}' | sort -u`

Are you trying to hold the output in variable 'fout'? If so, try this:

fout=`echo "$fnameLst" | awk '{gsub(/-dc[0-9.]*/,""); print}' | sort -u`

Without spaces around '='

Yes, that is what I am trying.

Finally understood what is going wrong.

set fout = `echo "$fnameLst" | awk '{gsub(/-dc[0-9.]*/,""); print}' | tr ' ' '\n' | sort -u`