linux - Remove the the character from the file -


i have out put

'< jan 20 sep> sample out put sample >  '< jan 21 sep> sample out put known errors > 

so need remove > special character file. line 1 special character > present needs removed.
have below out put

'< jan 20 sep> sample out put sample '< jan 21 sep> sample out put known errors 

you can use sed

sed '/^>$/d' myfile 

if output if you, can use -i flag override file:

sed -i '/^>$/d' myfile 

Comments