Skip to content

Instantly share code, notes, and snippets.

@commenthol
Created May 23, 2020 15:52
Show Gist options
  • Save commenthol/f3f4a9c2f3f58b4068dd70fd8556566d to your computer and use it in GitHub Desktop.
Save commenthol/f3f4a9c2f3f58b4068dd70fd8556566d to your computer and use it in GitHub Desktop.
#!/bin/bash
while read -r f
do
path=${f%/*}
file=${f##*/}
base=${file%%.*} # note needs $file
ext=${file#*.} # note needs $file
echo "$f ; $path ; $file ; $base ; $ext"
done < <(find . -name "*.sh")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment