Last active
March 3, 2024 01:55
-
-
Save bkw777/92ed6327873ef96088475bedc44e2ba5 to your computer and use it in GitHub Desktop.
cat without cat
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
# minimal example just for reference, not pointful by itself | |
# binary-safe read/write file without cp/cat/dd etc, pure bash, no subshell | |
while LANG=C IFS= read -d '' -r -n 1 x ;do printf '%c' "$x" ;done <bin1 >bin2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment