I would like to write a simple bash script that will allow me to create 5 text files called File1, File2, File3, File4 and File5 each populated with the text "F1", "F2", "F3", "F4" and "F5" respectively.
I have tried the script
for i in 1,2,3,4,5; do
echo "F"$i > File$i
done
But this creates one file called File1,2,3,4,5 with the text in it F1,2,3,4,5.
How do I correct this code?
Thank you very much
1,2,3,4,5to1 2 3 4 5as it is being read as one string due to the IFS(internal field separator) being default(Whitespace,tab newline).