Sed insert a line before match, you can use the sed function: i, add a new line before the matched string. syntax: sed '/option/i...