Today I Learned

2022/03/22

shell sed

You can replace the nth instance of a pattern on a line with sed:

; printf "a\tb\tc\n"  | sed 's/\t/\t~/2' 
# a       b       ~c