Last active
November 10, 2017 17:32
-
-
Save classmember/df40912fadf6d7972a2b724fc4f8fac4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # list primary domains of all | |
| # cPanel backups in the current directory. | |
| for file in $(\ls backup-*); do | |
| tar --occurrence=1 \ | |
| --to-stdout \ | |
| --extract \ | |
| --verbose \ | |
| --gzip \ | |
| --file=${file} \ | |
| */userdata/main | \ | |
| awk '/main_domain/{print $2}' | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment