Im using read in a while loop to automatically change a makefile after download.
Here is part of the script,
while read a; do if [[ "$a" = "FCOMPL=g77" ]] then echo "FCOMPL=gfortran" >> makefile elif [[ "$a" = "FFLAGC=-Wall -O" ]] then echo "FFLAGC=-Wall -O -fno-backslash" >> makefile else echo $a >> makefile fi done <makefile.orig
The problem is that I lose the tabulation.
Any idea of how I can avoid that?