linux find and remove bom from files
sed '1s/^\xEF\xBB\xBF//' < orig.txt > new.txt
linux find and remove bom from files
sed '1s/^\xEF\xBB\xBF//' < orig.txt > new.txt
linux find and remove bom from files
sed $'1s/\xef\xbb\xbf//' < orig.txt > new.txt
linux find and remove bom from files
sed -i '1s/^\xEF\xBB\xBF//' orig.txt
linux find and remove bom from files
sed '1s/^\xEF\xBB\xBF//' < orig.txt > new.txt
You can also overwrite the existing file with the -i option:
sed -i '1s/^\xEF\xBB\xBF//' orig.txt
If you are using the BSD version of sed (eg macOS) then you need to have bash do the escaping:
sed $'1s/\xef\xbb\xbf//' < orig.txt > new.txt
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us