Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- while read -r line ; do
- DIR=$(dirname $line)
- ORIG_IFS=$IFS
- IFS='/'
- subpath=""
- for i in $DIR; do
- subpath+="$i/"
- echo "$subpath"
- done
- IFS=
- echo "$line"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement