Skip to content

Instantly share code, notes, and snippets.

View 9072997's full-sized avatar

Jon Penn 9072997

  • Bentonville, AR
  • 07:47 (UTC -05:00)
View GitHub Profile
@9072997
9072997 / shorten.sh
Created March 31, 2023 19:20
a script to recursively shorten all the file names in a directory
#!/bin/bash
# this is a script to recursively shorten all the file names in a directory
function shorten() {
cd "$1"
pwd
# rename all the files in the directory to numbers
# if nessisary, move them to the temp directory to avoid name collisions
i=1