I have a directory of files - some of them with the naming convention *.input
What I would like to do is run the following command-line global replace on all of these *.input files:
[blue]For files *.input, replace the 15th to the last character of lines 2 and 3 with 'mystring'[/blue]
If its any easier, this would be acceptable to:
[blue]For files *.input, replace the 15th to the last character of line x with 'mystring'[/blue]
With that second one, I could just run it twice - once for line 2, and once for line 3.
I'm thinking that the perl substr function could be used, but I can't figure out how.
[red]FYI: I'm working in a UNIX KORN SHELL[/red]
What I would like to do is run the following command-line global replace on all of these *.input files:
[blue]For files *.input, replace the 15th to the last character of lines 2 and 3 with 'mystring'[/blue]
If its any easier, this would be acceptable to:
[blue]For files *.input, replace the 15th to the last character of line x with 'mystring'[/blue]
With that second one, I could just run it twice - once for line 2, and once for line 3.
I'm thinking that the perl substr function could be used, but I can't figure out how.
[red]FYI: I'm working in a UNIX KORN SHELL[/red]