in reply to Re^2: running shell script in cron
in thread running shell script in cron

does it have anyting to do with profiles

Could be. Decide which profile file(s) you need to execute (.bash_profile, .profile, .bashrc) and use 'source' to read them in at the start of the script.

Replies are listed 'Best First'.
Re^4: running shell script in cron
by Bloodnok (Vicar) on Mar 24, 2009 at 12:23 UTC
    From the name of the script, I would infer Korn shell is being used - hence the OP should use the dot command ('.') - source is, mercifully, not a Korn shell keyword.

    A user level that continues to overstate my experience :-))
Re^4: running shell script in cron
by raghu_shekar (Novice) on Mar 25, 2009 at 01:27 UTC
    i would need the .profile file, but when i add that in the start of the script as . /home/.profile, it gives me an error saying that the . in line 2 is unexpected or something like that.
      saying that the . in line 2 is unexpected or something

      Then why don't you fix line 2????

      -- 
      Ronald Fischer <ynnor@mm.st>