Question is : Write a Bash shell script that will rename all the files in a directory. It will mostly be useful to rename digital picture files. The first argument is a base name, second argument is a file extension. If it is run as:
$ rename vacation jpg then the resulting files should have names like: vacation001.jpg, vacation002.jpg, vacation003.jpg, etc.
I tried until here but I couldn't continue. Can you help me?
#!usr/bin/bash
a=1
directory=$1
for i in directory ; do