#/bin/bash # unzip all zip/7z files with 7z in pwd for f in ./*; do ext=${f##*.} if test "$ext" = zip; then 7z e "$f"; fi; if test "$ext" = 7z; then 7z e "$f"; fi; done