Artificial intelligent assistant

Replace value in a table I have some tables for which I need to replace a field that has a random position in each table. For information, the table are semicolon separated fields and I would like to replace the field `"datum"` by `"YEAR-MONTH-DAY"`. So far, I have tried: sed -i 's/datum/YEAR-MONTH-DAY/g' input > output But it just outputs an empty file.

As steeldriver astutely pointed out in the comments, you've told sed to `-i` edit the file in-place. As a result, sed will not provide any output, and so the `>` redirection will put that _nothing_ into the output file.

Either keep the `-i` flag and accept that the `input` file will be updated in-place:


sed -i 's/datum/YEAR-MONTH-DAY/g' input


or drop the `-i` flag and use the redirection to put the updated contents in the `output` file:


sed 's/datum/YEAR-MONTH-DAY/g' input > output

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy e3f43cb2964785ca5fe5f09f11201b58