I'm writing a bash script which, among other things, will edit crontab on another server. The way I figured out how to do this is with:
crontab -l | sed <stuff> | crontab -
It does what I need it to do, but I'm still not sure how. What exactly does "crontab -" do? When I run it by itself from the shell, it takes over the shell until I hit ctl+c, but doesn't seem to do anything. Is its only purpose to overwrite cron contents with whatever's passed from stdin? I can't seem to find any documentation on it.