So this behavior is really weird. I have always accessed a file line by line, get that variable in $i and then grep this value from a file to output to a file, but now it looks that everything up to the variable is being overwritten with the characters after the variables. Look:
for i in $(cat tissues); do echo "grep -w $i";done
grep -w AdiposeTissue
grep -w AdrenalGland
grep -w Bladder
Then when I do (some examples) :
for i in $(cat tissues); do echo "grep -w $i AnyInterestingFile.txt";done
AnyInterestingFile.txt
AnyInterestingFile.txt
AnyInterestingFile.txt
for i in $(cat tissues); do echo "grep -w $i AnyInterestingFile.txt param1 param2";done
AnyInterestingFile.txt param1 param2
AnyInterestingFile.txt param1 param2
AnyInterestingFile.txt param1 param2
for i in $(cat tissues); do echo "grep -w $i Anyfile";done
AnyfileAdiposeTissue
AnyfileAdrenalGland
AnyfileBladder