I have a bunch of files which I need to rename:
HDBB1A_ab.txt should become HDBB1_ab.txt
In other words, the 6th (sixth) character needs to be deleted. I've got two possible code lines:
- Code: Select all
mv $1 $(echo $1 | sed 's/.//6')
and
- Code: Select all
mv $1 $(echo $1 | sed 's6/.//')
But the one nor the other doesn't work. Any idea what I'm missing in the code?