Hacker News new | ask | show | jobs
by rav 3045 days ago
I've used script to run shell aliases defined in .bashrc in a cronjob. Normally you would use bash -ic my_alias in crontab to run my_alias, but this gives a warning from bash:

bash: cannot set terminal process group (1661): Inappropriate ioctl for device bash: no job control in this shell

With script -qc 'bash -ic my_alias' /dev/null, the warning goes away! (Of course, the real solution would be to turn my_alias into a proper shell script, but this works in a pinch when you have old habits to abide by.)