On macOS command line, how to replace first occurrence of a space by a tab, on each line of a file?
Examples of available tools on macOS: bash 3.2, BSD sed, awk, tr, perl 5, python 2.7, swift 4, etc.
I tried:
sed 's/^\([^ ]*\) /\1\t/' filename
But instead of a tab, I get the character 't'.