Inconsisten shell behavior using cron
Posted on 1998-10-23
I'm on DG AViiON DG/UX 5.11
I noticed some inconsistencies in the execution of a shell script. When running it from the system prompt, all variables are properly set. However, if I schedule it through cron, the same variables are not set. Here is my script:
cat t1 | while read line
echo "a: $a"
The contents of file t1 is:
When I run my script from the system prompt, the last echo command shows:
The same script run by cron shows:
How do I make it consistent?