zsh-users
 help / color / mirror / code / Atom feed
* zsh in cron
@ 2009-02-12  9:46 Alan
  2009-02-12 15:47 ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Alan @ 2009-02-12  9:46 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 642 bytes --]

Hi there,
I am trying to get the whole env variables that I get when I am logged in
but via cron:

I doing this with crontab -e:

* * * * *  zsh -lc "env" >& $HOME/out

but "out" shows me just a few lines when I was expecting to see more than
100 lines.

If I do something similar in a computer where my shell is tcsh:

* * * * *  csh -c "env" >& $HOME/out

It works as expected.

Any help would be very appreciated. Many thanks in advance.
Alan

-- 
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.
>>http://www.bio.cam.ac.uk/~awd28<<

[-- Attachment #2: Type: text/html, Size: 1005 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: zsh in cron
  2009-02-12  9:46 zsh in cron Alan
@ 2009-02-12 15:47 ` Bart Schaefer
  2009-02-12 19:58   ` Alan
  0 siblings, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 2009-02-12 15:47 UTC (permalink / raw)
  To: zsh-users

On Feb 12,  9:46am, Alan wrote:
}
} I am trying to get the whole env variables that I get when I am logged in
} but via cron:
} 
} I doing this with crontab -e:
} 
} * * * * *  zsh -lc "env" >& $HOME/out

I'm not sure why you want to to this, but try adding the -i option and
just for safety turn off ZLE:

* * * * *  zsh -ilc +Z "env" >& $HOME/out

This will force zsh to be an interactive shell and read more of the
startup files.  The -c option will still cause the shell to run only
the one command.  However, it may try to do terminal setup, so expect
some error output.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: zsh in cron
  2009-02-12 15:47 ` Bart Schaefer
@ 2009-02-12 19:58   ` Alan
  2009-02-12 20:08     ` Christian Schneider
  0 siblings, 1 reply; 6+ messages in thread
From: Alan @ 2009-02-12 19:58 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 1051 bytes --]

Thanks Bart, it worked like a charm.
BTW, what +Z options means? And what is ZLE, how to turn it off?

Would you know the equivalent with bash?

Many thanks,
Alan

On Thu, Feb 12, 2009 at 15:47, Bart Schaefer <schaefer@brasslantern.com>wrote:

> On Feb 12,  9:46am, Alan wrote:
> }
> } I am trying to get the whole env variables that I get when I am logged in
> } but via cron:
> }
> } I doing this with crontab -e:
> }
> } * * * * *  zsh -lc "env" >& $HOME/out
>
> I'm not sure why you want to to this, but try adding the -i option and
> just for safety turn off ZLE:
>
> * * * * *  zsh -ilc +Z "env" >& $HOME/out
>
> This will force zsh to be an interactive shell and read more of the
> startup files.  The -c option will still cause the shell to run only
> the one command.  However, it may try to do terminal setup, so expect
> some error output.
>



-- 
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.
>>http://www.bio.cam.ac.uk/~awd28<<

[-- Attachment #2: Type: text/html, Size: 1614 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: zsh in cron
  2009-02-12 19:58   ` Alan
@ 2009-02-12 20:08     ` Christian Schneider
  2009-02-12 20:12       ` Alan
  2009-02-13  3:15       ` Bart Schaefer
  0 siblings, 2 replies; 6+ messages in thread
From: Christian Schneider @ 2009-02-12 20:08 UTC (permalink / raw)
  To: zsh-users

* Alan <alanwilter@gmail.com> typed:
> Thanks Bart, it worked like a charm.
> BTW, what +Z options means? And what is ZLE, how to turn it off?

+Z is simular to ``--zle''; ZLE is the Zsh line editor.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: zsh in cron
  2009-02-12 20:08     ` Christian Schneider
@ 2009-02-12 20:12       ` Alan
  2009-02-13  3:15       ` Bart Schaefer
  1 sibling, 0 replies; 6+ messages in thread
From: Alan @ 2009-02-12 20:12 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

Many thanks,
Alan

On Thu, Feb 12, 2009 at 20:08, Christian Schneider <strcat@gmx.net> wrote:

> * Alan <alanwilter@gmail.com> typed:
> > Thanks Bart, it worked like a charm.
> > BTW, what +Z options means? And what is ZLE, how to turn it off?
>
> +Z is simular to ``--zle''; ZLE is the Zsh line editor.
>



-- 
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.
>>http://www.bio.cam.ac.uk/~awd28<<

[-- Attachment #2: Type: text/html, Size: 953 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: zsh in cron
  2009-02-12 20:08     ` Christian Schneider
  2009-02-12 20:12       ` Alan
@ 2009-02-13  3:15       ` Bart Schaefer
  1 sibling, 0 replies; 6+ messages in thread
From: Bart Schaefer @ 2009-02-13  3:15 UTC (permalink / raw)
  To: zsh-users

On Feb 12,  9:08pm, Christian Schneider wrote:
} Subject: Re: zsh in cron
}
} * Alan <alanwilter@gmail.com> typed:
} > Thanks Bart, it worked like a charm.
} > BTW, what +Z options means? And what is ZLE, how to turn it off?
} 
} +Z is simular to ``--zle''; ZLE is the Zsh line editor.

More precisely, +Z is equivalent to --nozle (whereas -Z is --zle).


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-02-13  3:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-12  9:46 zsh in cron Alan
2009-02-12 15:47 ` Bart Schaefer
2009-02-12 19:58   ` Alan
2009-02-12 20:08     ` Christian Schneider
2009-02-12 20:12       ` Alan
2009-02-13  3:15       ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).