Created
March 1, 2021 11:36
-
-
Save Rogach/663843cd072339b04541649dda35ea87 to your computer and use it in GitHub Desktop.
issue when copying contents of a file into a variable
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
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
TTTфTфTффффTTTффTфффффTTTTфTTTффTTфTTфTTTфTффффT | |
ффTфTTTTTTфTTTTффффTTTфTффTTфффTфTTTфTфффTTTTTTT | |
фффTфTTTфффTфTфффффTффTффTTTфффTTфTффффTTTфффTфф | |
TTTфффTTффTфTфффTфффффффTTффTTфTфффTTффффTTфTффT | |
ффTTфTTфTфTTTфTфффффффффTфTTTффTфTTTTTфTTTTTTфTT | |
фффTфTффTфффTTTTффTTTфффTффTфTффTффTфTффTTфTTTфф | |
ффTфTфTTTTффTфTфффTTфффTфTфффTTTTффTTTTфTффTфффT |
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 | |
var1=$(echo) | |
var2="TффффTфффффTфTффTTTфффTфффTфTф_$(date -Is)" | |
var3="$(cat input.tsv)" | |
# This one is just needed to visualize the error, | |
# using `set -x` shows that var3 already contains the incorrect data | |
echo "$var3" | iconv -f utf8 > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment