Linux

One-line batch file renamer

If you want to batch rename a bunch of files (say “foo*.jpg” to “bar*.jpg”), you might think you could just do “mv foo*.jpg bar*.jpg” in the Terminal. However, this doesn’t work right since the shell expands each argument before the execution occurs. However, there’s a cool way to accomplish the same result with a (more […]

Read More
Scripting

Bash misc tips

Bash debugging A nice thing to do is to add on the first line #!/bin/bash -x This will produce some interesting output information Reading user input with read In many ocations you may want to prompt the user for some input, and there are several ways to achive this. This is one of those ways: […]

Read More