Sed to Rename files
Sed stands for "Stream editor". Here is a nice way to rename files with regex using sed. I was running a user study today, and mistyped the file prefix. This created 100s of files with the wrong name. My initial thought was to use a script to fix it, but then decided to lookup sed. Here is how I did it: $ touch fooops_1.txt fooops_2.txt fooops_3.txt $ ls Let's say our goal was to type "foobar" as the prefix....