A friend of mine grouped tons of files in this way on windows

![enter image description here](https://i.stack.imgur.com/NHe1B.png)

After I made him switch to Ubuntu, files are no more ordered based on the number of exclamation marks in front, so I would like to know how would I be able to switch them following this rule:

* `1` for `!` and `!!`
* `0` for `!!!` and `!!!!`

I guess I should use awk but I am not an expert, therefore here I am..