Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

All the examples are more-or-less idempotent. For example the `blkid /dev/sda1 || mkfs.ext4 /dev/sda1` doesn't guarantee what type of filesystem the partition will have. `touch file` changes the mtime of the file. `ln -sf` will fail if the target is a directory and is not atomic.

It would be nice to have a toolset of commands that are all idempotent to make that type of task easier.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: