So, for my statistics class, I've been using a lot of linux trickery to organize my numbers, copy/paste them around, etc. Now, I haven't had any issues until just recently... I had copy pasted a bunch of values out of Open Office (could be the culprit), and was trying to format them like so...
echo "5 8 6 25 4 21 10 1 24 12 4 16
9 2 12 28 14 17 12 1 16 18 18 3
12 6 6 12 10 20 9 6 8 6 8 15" | sed 's/\s\+/\n/g' | grep -v ^$ | sed 's/[[:space:]]*$//g' > test.txt
This would put each number on it's own line just fine, but when I pasted into statdisk, I was getting some invalid character errors. It APPEARED to be a space, but I tried using sed and tr with varations on [:space:], [:blank:], and things like s/[ \t]*$//g to try and remove whatever was trailing at the end (which I could delete just fine in Vim). But nothing on the CLI worked.
Running a hexdump on that file gives me
5 � � \n 8 � � \n 6 � � \n 2 5 � �
What the heck are those? hexdump -C
35 c2 a0 0a 38 c2 a0 0a 36 c2 a0 0a 32 35 c2 a0 |5...8...6...25..|
Anyone have any idea what those c2 a0 bytes are? Is there an easy/elegant way to nuke them with sed or tr or something? Or being non-ascii would I need to do something clever with byte manipulation... Any thoughts/suggestions?
sed
interface/plugin