Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

linux find and remove bom from files

sed -i '1s/^xEFxBBxBF//' orig.txt
Comment

linux find and remove bom from files

sed '1s/^xEFxBBxBF//' < orig.txt > new.txt
Comment

linux find and remove bom from files

 sed $'1s/xefxbbxbf//' < orig.txt > new.txt
Comment

linux find and remove bom from files

sed '1s/^xEFxBBxBF//' < orig.txt > new.txt
You can also overwrite the existing file with the -i option:

sed -i '1s/^xEFxBBxBF//' orig.txt
If you are using the BSD version of sed (eg macOS) then you need to have bash do the escaping:

 sed $'1s/xefxbbxbf//' < orig.txt > new.txt
Comment

PREVIOUS NEXT
Code Example
Shell :: git checkout to pr 
Shell :: get code back after hard reset 
Shell :: append two image terminal 
Shell :: redis quicstart 
Shell :: Linux install from .tar.gz 
Shell :: linux add homedir 
Shell :: how to solve the brightness problem on unbuntu 
Shell :: rename multiple files mac terminal 
Shell :: create service without spec 
Shell :: docker sh: react-scripts: not found 
Shell :: express application generator 
Shell :: delete last pushed commit 
Shell :: install just linux 
Shell :: latte dock application launcher shortcut 
Shell :: redis 
Shell :: bash function 
Shell :: git bad object 
Shell :: git clone assigning a different local branch name 
Shell :: bash how to print the list of files in a directory ls 
Shell :: docker prune dangling none 
Shell :: extract a tar.xz in linux 
Shell :: internet not working on centos 8 on linux 
Shell :: how to install jupyterlab 
Shell :: mysql specify a socket 
Shell :: du linux 
Shell :: allow port on ufw 
Shell :: install solana 
Shell :: ubuntu download 
Shell :: linux run task in background 
Shell :: bash read input 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =