I want to edit another user's crontab with the output from STDIN. crotnab usage is apparently as follows:
Code:
crontab [file | -e | -l | -r ] [user]
But entering the following pops up with a 'proper usage' error:
Code:
cat test.cron | sudo crontab - username
Similarly, trying to take the input from a file has the same error:
Code:
sudo crontab /tmp/test.cron username
On the other hand, I can edit my own crontab with no problems:
Code:
cat test.cron | crontab
Error for all is as follows:
Code:
crontab: proper usage is:
crontab [file | -e | -l | -r ] [user]
I've trying to figure out the best way to do this - I want to do it from STDIN, rather than a file, since the command I'll be using outputs to STDOUT by default, however I don't even have the option to take input from a file, apparently!
If anyone could help with this, I would appreciate it.