Skip to main content
deleted 17 characters in body
Source Link
Rui F Ribeiro
  • 57.9k
  • 28
  • 156
  • 237

If you have the rename utility, read the man page on how to do string replacement.

If you do not have the rename utility, use some kind of for loop to do the renaming. Something like the following should work:

for f in *.jpg; do
    mv ${f} $(echo ${f} | sed -e 's#^.#ICON#')
done

The sed command is just replacing the first character with the string ICON.

Hope this helps

If you have the rename utility, read the man page on how to do string replacement.

If you do not have the rename utility, use some kind of for loop to do the renaming. Something like the following should work:

for f in *.jpg; do
    mv ${f} $(echo ${f} | sed -e 's#^.#ICON#')
done

The sed command is just replacing the first character with the string ICON.

Hope this helps

If you have the rename utility, read the man page on how to do string replacement.

If you do not have the rename utility, use some kind of for loop to do the renaming. Something like the following should work:

for f in *.jpg; do
    mv ${f} $(echo ${f} | sed -e 's#^.#ICON#')
done

The sed command is just replacing the first character with the string ICON.

Source Link
Lewis M
  • 1.1k
  • 6
  • 6

If you have the rename utility, read the man page on how to do string replacement.

If you do not have the rename utility, use some kind of for loop to do the renaming. Something like the following should work:

for f in *.jpg; do
    mv ${f} $(echo ${f} | sed -e 's#^.#ICON#')
done

The sed command is just replacing the first character with the string ICON.

Hope this helps