delete non printable characters from file

i have a file which contains non printable characters
like enter,escape etc
i want to delete them from the file

Instead of cat you can try strings command which prints only printable character.

strings filename
  • nilesh
tr -dc '[:print:]'  < oldfile> newfile