Hi, need some pointers on a short AWK-script please.
I have 2 files, one large file looking something like this:
# File header bla bla
# more headertext here
firstword * 5
secondword *
anotherword 0 15
hello
and *
so-on *
The second file looks like this:
anewword
another-word
goodbye
test
I need to put the words from the second file who is not in the
first file into the file, and replace those who exist in
the file but are whitout the - dash.
So "anotherword 0 15" should replace "another-word 0 15",
and anewword, goodbye and test should be appended to the file.
I not able to get both the replaced lines, added lines and
unchanged lines together into a new file.
I only get the changed/added lines... help please ;-)
BTW the header should not be touched.
I have 2 files, one large file looking something like this:
# File header bla bla
# more headertext here
firstword * 5
secondword *
anotherword 0 15
hello
and *
so-on *
The second file looks like this:
anewword
another-word
goodbye
test
I need to put the words from the second file who is not in the
first file into the file, and replace those who exist in
the file but are whitout the - dash.
So "anotherword 0 15" should replace "another-word 0 15",
and anewword, goodbye and test should be appended to the file.
I not able to get both the replaced lines, added lines and
unchanged lines together into a new file.
I only get the changed/added lines... help please ;-)
BTW the header should not be touched.