This file contains 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/bash | |
for filename in `ls /path/to/directory/*.tar.gz`; do | |
tar -zxvf $filename *.txt | |
done |
The above example loops through all .tar.gz files in the directory and extracts any text file within those files.
No comments:
Post a Comment