Skip to main content
deleted 8 characters in body; edited tags; edited title
Source Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 264

Sed command that replaces characters Replace only the first character of a matched pattern

I need to write a sed command that reads from a file and replaces the first character in each line with 0, only in the event that the first and second character in that line is a digit (and leave the rest of the lines intact)

Thanks.

Sed command that replaces characters

I need to write a sed command that reads from a file and replaces the first character in each line with 0, only in the event that the first and second character in that line is a digit (and leave the rest of the lines intact)

Thanks

Replace only the first character of a matched pattern

I need to write a sed command that reads from a file and replaces the first character in each line with 0, only in the event that the first and second character in that line is a digit (and leave the rest of the lines intact).

Source Link
Kostas662
  • 13
  • 1
  • 1
  • 3

Sed command that replaces characters

I need to write a sed command that reads from a file and replaces the first character in each line with 0, only in the event that the first and second character in that line is a digit (and leave the rest of the lines intact)

Thanks