R
rashidaq
I have file which is separated by commas.
This is like csv file, actually a database which
has 10 to 15 fields separated by commas.
I can get a print of field number 6 awk on a file which has fields
separated by commas
awk -F, '{print $6}' file
this prints number 6 field only.
Now how do I substitute a certain field with another word/string on
certain line range.
I have tried the vi editor
I have manage to append line #6 to #1876 to the end of lines
here is what I do
:2,1876s/$/stringtobeAppended/g and it works but
now how do I replace in the middle like field number 6 separated by
commas
on certain line range.
if done in PERL easily then I have to learn that too.
thanks in advance
Rashid
This is like csv file, actually a database which
has 10 to 15 fields separated by commas.
I can get a print of field number 6 awk on a file which has fields
separated by commas
awk -F, '{print $6}' file
this prints number 6 field only.
Now how do I substitute a certain field with another word/string on
certain line range.
I have tried the vi editor
I have manage to append line #6 to #1876 to the end of lines
here is what I do
:2,1876s/$/stringtobeAppended/g and it works but
now how do I replace in the middle like field number 6 separated by
commas
on certain line range.
if done in PERL easily then I have to learn that too.
thanks in advance
Rashid