This is one more for myself than anyone else as I keep forgetting how todo it.... but if anyone is interested. I normally don't use bash - I'm not entirely sure why I don't (if you don't know what bash is, then I wouldn't worry - its the Bourne Again Shell and is based on the Bourne shell, sh, the original command interpreter). Anyway, this is a very simple thing todo.. but every time I come todo it I have to look it up, so I'm going to just look it up here...
Just to add some text at the front:
for i in *; do mv "$i" "photo${i}.jpg" ; done
To remove some text in the string:
for i in *.jpg; do mv "$i" "${i/Yourself}" ; done
and to rename as a numeric string... my most common task...
number=0
for i in *.jpg; do mv "$i" "$number" ; (( number += 1 )); done







