$ wget https://example.com/jpg/1111 $ wget https://example.com/jpg/2222 $ ls 1111 2222 $ rename 's/(.*)/$1.jpg/' * $ ls 1111.jpg 2222.jpg