Advertisement
ulysses4ever

Create dirs when unzip

Jan 14th, 2016
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.20 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. submission_zip_file="$1"
  4. dir="${submission_zip_file%.zip}"
  5. 7z x -o"$dir" "$submission_zip_file"
  6. cd "$dir"
  7. ls *.zip | awk -F'.zip' '{print "7z x -o\""$1"\" \""$0"\""}' | sh
  8. rm *.zip
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement