Skip to content

Instantly share code, notes, and snippets.

View jkdoshi's full-sized avatar

Jitesh Doshi jkdoshi

View GitHub Profile
@jkdoshi
jkdoshi / .bashrc
Last active May 10, 2025 20:32
a bash alias/function to rename a bunch of files to uniformly named and numbered files (e.g. "file-1.ext", "file-2.ext" etc.
function mv_mutli() {
options=$(getopt -o n:e:p:d: -- "$@")
optcode=$?
eval set -- "$options"
declare -i i=1;
ext="" # default extension ("" means keep the original extension)
prefix="file-"
destdir=""
while true;do