
21 Mar
2024
21 Mar
'24
11:39 a.m.
Okay, clickbait subject line, but hear me out. I had a bunch of files called *.sh for backing up stuff. I decided to use `run-parts` to run the entire folder of shell scripts at once. `run-parts` won't run *.sh files (?!?), they need to be *.s-h or something dumb. I wanted to REName *.sh -> *. In DOS: `ren *.sh *.` In bash, that will not work (with file globbing & pathname expansion enabled by default). I had to do this instead: for I in *.sh ; do mv ${I} ${I%%.sh} done Clearly, DOS > bash. (Told ya so, Hugh.) rb