Created
December 25, 2021 08:25
-
-
Save asukaminato0721/373c4e972623f4797bc2f8bd806de38d to your computer and use it in GitHub Desktop.
a simple script which can show text files easily.
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 fn in "$@" | |
do | |
[[ -s "$fn" ]] && iconv < "$fn" -f $(uchardet "$fn") -t utf8 | less | |
done | |
# you can just use it like cat, alias cat=autocat.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment