Hi,
I am trying to change a vlue in a line based on position. Like if I have line that 11231234, I want to change position 4 to 7 by abc. I have am using sed command but don't know how to do it by position. sed does the pattern matching based on string but I could not find a way to search it via position. I did get sample code from net but it just replaces the position. Following is the code:
echo 1235678 |sed 's/^\(1.\{1\}\)./\1/'
Please give any sugestions to replace the string or any options with sed command that I can use.
I am trying to change a vlue in a line based on position. Like if I have line that 11231234, I want to change position 4 to 7 by abc. I have am using sed command but don't know how to do it by position. sed does the pattern matching based on string but I could not find a way to search it via position. I did get sample code from net but it just replaces the position. Following is the code:
echo 1235678 |sed 's/^\(1.\{1\}\)./\1/'
Please give any sugestions to replace the string or any options with sed command that I can use.