Last active
January 31, 2023 18:36
-
-
Save Sergi030/c6f484e95615eadf9570acbe3ac7fbdb to your computer and use it in GitHub Desktop.
show_tarball_replacing_files
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/bash | |
if [ $# -ne 1 ] | |
then | |
echo "$@ <tarfile>" | |
exit 1 | |
fi | |
if [ ! -f $1 ] | |
then | |
echo "$@ <tarfile>" | |
echo "$1 tarball does not exits" | |
fi | |
for x in $(tar -tf $1) | |
do | |
if [ -f $x ] | |
then | |
echo $x | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment