I have a directory full of files with the name template
xxx[0-9][0-9][0-9[0-9]ss(wrx-mmm).zip
The zip files contain a file yrq000.dat
and I don't want to overwrite them when the files are uncompressed.
I am creating a processing script but I want to name that common file a name associated with its source zip and I'm checking the method:
for f in $(ls xxx*)
do
uniquename="${f%%(wrx.*zip}"
done
I can't figure out how to strip that opening parens from the string.
Is that possible with the bash string manipulation the way I am doing it? That is to say, it does not work. What do I need to add or remove so that it does work?