Update functions

Bash oneliners (untested)