Skip to main content
added 69 characters in body
Source Link
Kusalananda
  • 355.8k
  • 42
  • 735
  • 1.1k

The control character produced by Ctrl+Z is \032 in octal. This can be deleted by tr:

tr -d '\032' <file >newfile

This deletes the characters anywhere in the file and creates a new file called newfile with the modified contents.


Your sed command does not work as the expression ^Z would match a Z character at the start of the line. The ^ anchors the rest of the expression at the start of the line.

The control character produced by Ctrl+Z is \032 in octal. This can be deleted by tr:

tr -d '\032' <file >newfile

This deletes the characters anywhere in the file and creates a new file called newfile with the modified contents.


Your sed command does not work as the expression ^Z would match a Z character at the start of the line.

The control character produced by Ctrl+Z is \032 in octal. This can be deleted by tr:

tr -d '\032' <file >newfile

This deletes the characters anywhere in the file and creates a new file called newfile with the modified contents.


Your sed command does not work as the expression ^Z would match a Z character at the start of the line. The ^ anchors the rest of the expression at the start of the line.

added 30 characters in body
Source Link
Kusalananda
  • 355.8k
  • 42
  • 735
  • 1.1k

The control character produced by Ctrl+Z is \032 in octal. This can be deleted by tr:

tr -d '\032' <file >newfile

This deletes the characters anywhere in the file and creates a new file called newfile with the modified contents.


Your sed command does not work as the expression ^Z would match a Z character at the start of the line.

The Ctrl+Z is \032 in octal. This can be deleted by tr:

tr -d '\032' <file >newfile

This deletes the characters anywhere in the file and creates a new file called newfile with the modified contents.


Your sed command does not work as the expression ^Z would match a Z character at the start of the line.

The control character produced by Ctrl+Z is \032 in octal. This can be deleted by tr:

tr -d '\032' <file >newfile

This deletes the characters anywhere in the file and creates a new file called newfile with the modified contents.


Your sed command does not work as the expression ^Z would match a Z character at the start of the line.

Source Link
Kusalananda
  • 355.8k
  • 42
  • 735
  • 1.1k

The Ctrl+Z is \032 in octal. This can be deleted by tr:

tr -d '\032' <file >newfile

This deletes the characters anywhere in the file and creates a new file called newfile with the modified contents.


Your sed command does not work as the expression ^Z would match a Z character at the start of the line.