On Tue, 19 Jun 2018, Robert Citek wrote:
I don't fully understand your question, but here are some examples that may be a step in the right direction:
Robert, I did not provide as complete an explanation as I should have. Each file has 8761 lines, one for each hour of each day during the (non-leap) year, plus a header line. It's not just two isolated lines, unfortunately. I don't follow the logic of your two examples for finding only the duplicate 16:00 hours in each day, and changing only the second instance to 17:00.
$ seq 1 5 | sed -e '1~2s/$/ --/' 1 -- 2 3 -- 4 5 -- $ seq 1 5 | sed -e '0~2s/$/ --/' 1 2 -- 3 4 -- 5
Perhaps I need to write a python script that looks for the string, 16:00, and sets a flag the first time that's found. The next time it's found, in the following row, the flag is set so the string is changed to 17:00 and the flag is unset. Then the script keeps reading until it encounters the next day's 16:00 row. Thanks, Rich _______________________________________________ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug