Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- FNAME=$1
- list=$(zipinfo -1 $FNAME)
- mkdir tmp
- unzip $FNAME -d tmp
- ls -1 /tmp | while read x; do
- name=$(echo $list | awk -F'[_]' '{print $2}')
- if [ ! -d /$name ]; then
- mkdir $name
- mv $x $name
- else
- mv $x $name
- fi
- done
- #mv *_attempt_[0-9\-]*.txt memo.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement