for i in {1..3}; do
    printf ${i} > file_${i}.txt
done