Last active
November 4, 2023 11:25
-
-
Save Armatix/a788f796c290d51a0e3272579f72b9c4 to your computer and use it in GitHub Desktop.
files to text | a one liner to convert files in current directory to a one liner shell script for copy pasting small files
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 | |
if [ $# -eq 0 ]; then | |
echo "Usage: $0 <directory/files>" | |
exit 1 | |
fi | |
content=$(tar cf - --numeric-owner "$@" | gzip -c | base64) && echo " echo '$content' | base64 -d | gunzip -c | tar xf -" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
here is the one liner: