-1

How can I change multiple files name in Sunos. I want to delete '!'.

sca_RetrieveResource!1.0.0.0.jar
sca_RetrieveSimcardChangeStatus!1.0.0.0.jar
sca_RetrieveTGInfo!1.0.0.0.jar
sca_RetrieveTGInfo!1.0.0.1.jar
sca_RetrieveTGInfo!1.0.0.2.jar
sca_ValidateCustomerEligibility!1.0.0.0.jar
sca_ValidateCustomerEligibility!1.0.0.1.jar
sca_ValidateCustomerEligibility!1.0.0.2.jar
sca_ValidateCustomerEligibility!1.0.0.3.jar
sca_ValidateCustomerEligibility!1.0.0.4.jar
sca_ValidateCustomerEligibility!1.0.0.5.jar
sca_ValidateIntercomTariff!1.0.0.0.jar
sca_ValidatePackageSale!1.0.0.0.jar
sca_ValidateProduct!1.0.0.0.jar
sca_ValidateProduct!1.0.0.1.jar
sca_ValidateProduct!1.0.0.2.jar
sca_ValidateReload!1.0.0.0.jar
sca_X_HEALTH_CHECK!1.0.0.0.jar
Dominique
  • 16,450
  • 15
  • 56
  • 112
Emrahall
  • 47
  • 6

2 Answers2

0

I've done this kind of thing multiple times, and I can tell you: don't write a script, doing this automatically. The best thing to do, is to open this list of filenames in a column-based text editor (like Notepad++), and create a bunch of lines like this:

mv sca_RetrieveResource!1.0.0.0.jar            sca_RetrieveResource1.0.0.0.jar           
mv sca_RetrieveSimcardChangeStatus!1.0.0.0.jar sca_RetrieveSimcardChangeStatus1.0.0.0.jar
mv sca_RetrieveTGInfo!1.0.0.0.jar              sca_RetrieveTGInfo1.0.0.0.jar
mv sca_RetrieveTGInfo!1.0.0.1.jar              sca_RetrieveTGInfo1.0.0.1.jar
mv sca_RetrieveTGInfo!1.0.0.2.jar              sca_RetrieveTGInfo1.0.0.2.jar

It does not look very good, but you can check if everything is ok, you can intervene when something is going wrong, ..., but if you mess it up in a script, you'll have an enormous workaround to get everything correct again.

Dominique
  • 16,450
  • 15
  • 56
  • 112
0

The question has resolved (for f in *; do mv "$f" $(echo "$f" | sed 's/!/_rev/g'); done)

Emrahall
  • 47
  • 6