5

Need help to replace a pattern on specific line in a data file

view full story
linux-howto

http://www.unix.com – Hi, I want to replace specific pattern "-2.0000 2" by "1.0000 3" on a particular line (line #5) in a file 1.dat. I have about 50 more files similar to 1.dat in which I want to do this correction. Can you please suggest how can I make change only at this particular line of a file and retain remaining file as it is. Code: $cat 1.dat       1    4.619209  -2.737649  16.892469  -2.0000      2      10      1       2    -4.132976    1.244 (HowTos)