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
  • 5,637
  • 4
  • 27
  • 37

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
  • 16,005
  • 2
  • 34
  • 51
1

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

Kishore
  • 819
  • 9
  • 20