I am writing a bash script to change a string
./FirstJavaProgram.class
to
FirstJavaProgram
I came up with this script. However bash complains line 4 is bad substitution.
#!/bin/sh
file=${1%%.class}
echo $file
file=${file/.\//}
How should I write the correct syntax?