(Also—that entire function is super inefficient and could be replaced with a single invocation of "rename".)
I have:
Movie Bla (2020)
Movie Bla (2020).mp4
But also: Movie_Bla_(2020)
Movie_Bla_(2020).mp4
Movie_Bla_(2020).srt
Would not like to lose files like the the srt.By the way: what's your beef with en dashes? I mean, if it was "everything should be 'HYPHEN-MINUS' (U+002D)", then fine, but why specifically en dashes and not em dashes?
# Rename all files in a directory
rn() {
rename "s/ /-/g" *
rename "s/_/-/g" *
rename "s/–/-/g" *
rename "s/://g" *
rename "s/\(//g" *
rename "s/\)//g" *
rename "s/\[//g" *
rename "s/\]//g" *
rename 's/"//g' *
rename "s/'//g" *
rename "s/,//g" *
rename "y/A-Z/a-z/" *
rename "s/---/--/g" *
rename "s/---/--/g" *
}
I use this all the time, especially when I download files.Can anyone recommend a good Linux laptop that will offer up to 32gb of RAM and have decent battery life?
If you need 32GB of RAM, then the ThinkPad T460 would qualify. And Lenovo claims it has 18 hours of battery life, which seems more than decent to me.
I switched from MacBook Pros to the ThinkPad T Series running GNU/Linux a few years ago and I have not been disappointed. My only caveat is that I like to run Debian stable, and that seems to work better on older ThinkPads, especially for things like video chats. In my experience, the newer ThinkPads work better with distros that use newer kernels (at least I think that is why), such as Ubuntu or Fedora.
I would have suggested the T460s, which is lighter, but that only goes up to 20GB of RAM.