tomnomnom / anew

A tool for adding new lines to files, skipping duplicates
MIT License
1.34k stars 147 forks source link

Entries appended without a new line #19

Open serialfuzzer opened 1 year ago

serialfuzzer commented 1 year ago

I have two files: first.txt (Doesn't have an empty line in the end)

1
2
3

second.txt

1
2
3
4
5

cat second.txt | anew first.txt

cat first.txt

image

The solution might be to add a new line if previous character wasn't a new line before appending new entries to the file.