I know GEdit has a bug which prevents it from opening a file with null (\0
) characters in it. This is a huge inconvenience for me because I frequently have to open big log files with only a couple rogue \0
's in them.
Sometimes I just run a quick tr -d '\0' < file.log > file.log.correct
and open the correct file. This is a big nuisance. I would like to have maybe an external tool in GEdit that would execute the above command. I tried writing an external tool action (GEdit plugin) using just:
#!/bin/bash
tr -d '\0'
Input is "current document", output action is "replace current document". But this isn't working. When I open the file, GEdit shows the familiar red warning; activating the external tool with the warning showing apparently has no effect (I think the script is being called but its input/output are not set).
Any other ideas I could try?