commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Takes file (text.txt), removes BOM from it, and outputs the result to a new file (newFile.txt). BOM is "Byte Order Mark" ([http://en.wikipedia.org/wiki/Byte_order_mark]), an invisible, non-breaking, zero-length character. In other words, if you see a DIFF with "" at the beginning, you've got a byte order mark, which can't be removed without this command or a hex editor. It can appear for a number of reasons, such as getting copied to/from a UNIX filesystem...
There are 6 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.