i'm sure this is a pretty straightforward question - but i can't seem to work out this problem
supposing i have a textual data file '3cols.txt' as follows:-
123 abc DEFG
234 def GHIJ
345 ghi JKLM
456 jkl MNOP
567 mno PQRS
and i need to replace the 4th line with:-
456 new DATA
i.e. what is the easiest way to achieve this - i.e. all i want to give the script is a pointer to the line i want to change
what is the easiest way to go about this?
i need to end up with the original file with this content:-
123 abc DEFG
234 def GHIJ
345 ghi JKLM
456 new DATA
567 mno PQRS
supposing i have a textual data file '3cols.txt' as follows:-
123 abc DEFG
234 def GHIJ
345 ghi JKLM
456 jkl MNOP
567 mno PQRS
and i need to replace the 4th line with:-
456 new DATA
i.e. what is the easiest way to achieve this - i.e. all i want to give the script is a pointer to the line i want to change
what is the easiest way to go about this?
i need to end up with the original file with this content:-
123 abc DEFG
234 def GHIJ
345 ghi JKLM
456 new DATA
567 mno PQRS