Quantcast
Channel: bash – Distributed Life
Viewing all articles
Browse latest Browse all 6

Really simple batch renaming in Linux

$
0
0
While working on the photos section of trigonakis.com, I wanted to batch rename some photos, so after the renaming their new name would be prefix_i, where i is a incremental value. The following (stupidly) simple bash script provides the desired functionality: #!/bin/bash   INDEX=1   for i in *.$1; do echo item $INDEX: "$i" renamed to [...]

Viewing all articles
Browse latest Browse all 6

Trending Articles