Skip to content

Instantly share code, notes, and snippets.

@arshinalbab
Created November 28, 2020 15:48
Show Gist options
  • Select an option

  • Save arshinalbab/a40c69068ce0d008899568f2b2c47a18 to your computer and use it in GitHub Desktop.

Select an option

Save arshinalbab/a40c69068ce0d008899568f2b2c47a18 to your computer and use it in GitHub Desktop.
Compress all .SQL files in current directory to TAR.GZ & Get the md5 sum of all TAR.GZ files
#!/bin/bash
# Compress all .SQL files in current directory to TAR.GZ
# Single Line
# for i in *.sql; do tar -czf $i.tar.gz $i; done
for i in *.sql;
do tar -czf $i.tar.gz $i;
done
# Get the md5 sum of all TAR.GZ files
# Single Line
# for i in *.gz; do md5sum $i; done
for i in *.gz;
do md5sum $i;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment