Can anyone please suggest how to solve this? Suppose I have a file, and I want to replace the first occurrence of a pattern in matching line with some dynamic value. The pattern here is as.source file:a b c as aa asas b d f aa sadf as kf as dftarget file: a b c 1 aa as2 b d f aa sadf 3 kf as df
pattern replacement using sed
awk;sed