How to zip all directories inside a directory in one step in Linux
Channel: Mian Ahmad
Date: 21/02/2021

How to zip multiple directories in linux in one go

zip -r dir.zip dir
for i in */; do zip -r "${i%/}.zip" "$i"; done
for i in */; do zip -r "${i%/}.zip" "$i"; rm -rf "$i"; done