Skip to main content
2 of 8
added 22 characters in body
jippie
  • 14.6k
  • 10
  • 49
  • 67

Interactive shell with environment identical to cron

I am aware of a lot of pitfalls in the magic world of crontabs, but sometimes it would help troubleshooting a lot when you have some smart way to enter an interactive (bash) shell with exact identical environment as when a shell script is run from a crontab.

Now I thought myself of /bin/openvt -- /bin/bash -i --noprofile, but it require root privileges and I don't have the flags just right to work.

Anybody know of a way to start a interactive bash shell with identical-to-cron environtment and not requiring root privileges on Kubuntu?

Bonus when it works in an ssh session, in the GUI and on one or more of the following OS's too: HP-UX, Solaris and AIX

jippie
  • 14.6k
  • 10
  • 49
  • 67