I need the correct syntax to copy file.jpg 100 times with one command to get 100 files with the name file001.jpg, file002.jpg, ..., file100.jpg. I use this, but dont work for me any advice
#!/bin/bash for x in `seq 1 100`; do if [[ x -lt 10 ]]; then cp file.jpg file-00$x.jpg; elif [[ x -lt 100 ]]; then cp file.jpg file-0$x.jpg; else cp file.jpg file-$x.jpg; fi done
source share