Remove NULL-values in .txt document
Hi, i have a .txt document which is full of NULL-values, between every character there is a NULL. Is there any way of deleting only the NULL-values?
You mean like a blank space?
Just use sed or vi's search and replace function.
Yes ive thought f the find and replace function but the thing is, i dont know how to add the value NULL. Its not space or anything, when i open it in notepad+ or even notepad, NULL is a black box that says NULL.
In unix, try this: tr -d '\000' < origfile.txt >newfile.txt
"tr" is used to translate characters. Should work. I've also heard that if you just open the file in vi and then wq! (write-quit) the file, the nul characters will be removed, although I haven't tried this myself. Finally, you could try, again in Unix, dos2unix which will remove dos based characters such as CR\LF. Not sure if dos2unix removes nul characters, but it can't hurt to try.