I have a .txt
file originated from Windows, so its line endings are \r\n
. Running cat
or echo
on that file makes those control characters go away. How can I display the file (even in raw bytes if possible) while preserving the original control characters from Windows?
Command Line – How to Put File into Clipboard Without Losing Control Characters
command lineencodingwindows
Related Question
- Windows – Using dd to image a corrupted Windows disk
- Windows – How to remotely, outside the network, access files on the Windows computer from the iphone over the internet, using mobile data
- Windows – Bootcamp Mojave and Windows 10 now all Mac OS startup keys don’t work
- How to Install and Use Programs in macOS
Best Answer
pbcopy
will take input piped or redirected into it, and store it in a "pasteboard" (i.e. clipboard). So to copy a file verbatim, use a redirection:To paste, use Commandv or