Created
June 6, 2016 20:51
-
-
Save minektur/d96cfb90f5d0766f8052e22671f45822 to your computer and use it in GitHub Desktop.
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 | |
LC_ALL=C | |
c="" | |
off=0 | |
IFS='' | |
while read -r -N 1 c ; do | |
if [ ${#c} -lt 1 ]; then | |
# would only print when in the right range | |
printf "\0" | |
else | |
# would only print when in the right range | |
printf "%c" "$c" | |
fi | |
off=$(( $off + 1 )) | |
done < $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment