2

I am using echo statements in a shell script. The shell script will be run by a cronjob.Will the output of those echo statements get automatically logged somewhere ?. If yes,where ?

Thank You

jimcgh
  • 4,997
  • 2
  • 26
  • 35

2 Answers2

2

Usually crond will email output to the user. You are better off doing this (example crontab entry)

* * * * * /path/to/my/script.sh 2&>1 > /tmp/mylogfile.log
jim mcnamara
  • 15,489
  • 2
  • 30
  • 48
1

You can either check syslogs or redirect the output of your script to a file.

Kishore
  • 809
  • 9
  • 19