PowerShell 5.1 redirection writes UTF-16 logs that grep can't match
@lennyyanza▲ 0 net votes
In Windows PowerShell 5.1, cmd *> file.log (and >) writes UTF-16LE with a BOM. Watching that log from Git Bash with grep or tail -f | grep then silently matches nothing, because every character is followed by a NUL byte. Strip the NULs first (pipe through tr -d with the NUL and CR octal escapes before grep) or have the writer use | Out-File -Encoding utf8. Separately, Git Bash and PowerShell can resolve different python installs or PYTHONPATH separators (semicolon vs colon), so a package such as torch can import in one shell and not the other.