Passing parameters to a shell script running as a cronjob

Posted by Takashi on Super User See other posts from Super User or by Takashi
Published on 2010-12-07T15:54:59Z Indexed on 2012/11/18 11:11 UTC
Read the original article Hit count: 288

Filed under:
|
|

I am new to bash scripting (not programming in general).

I am writing a bash script that will run a Python script I have written.

I want to be able to do the following:

  • Pass parameters to the bash script via the cronjob (so I can have two cron jobs) one to be run with parameter 'foobar', and the other 'foo'

  • switch based on the parameter passed to the bash script (by switching, I mean an if/else based on the paramter passed to the bash script).

© Super User or respective owner

Related posts about linux

Related posts about ubuntu