.profile scripts under Q2PTERM and SSH

Issue #42 resolved
Former user created an issue

I am finding inconsistencies from .profile scripts running when call Q2PTERM and when I use SSH into my LPAR or basically any script.

For example: HOST=$(uname -n) -- works fine with Q2PTERM but throws an error with SSH session

Thoughts?

Comments (3)

  1. Kevin Adler

    The shell used by QP2TERM is /QOpenSys/usr/bin/ksh, while SSH will use the user's shell if one is set or fall back to /QOpenSys/usr/bin/bsh. The problem is that user's don't have their shells set by default, so you must set it yourself: http://ibmsystemsmag.com/blogs/open-your-i/august-2017/tech-tip-be-like-a-turtle/

    bsh is very old and doesn't support "advanced" features like $() syntax. Instead, you would need to use portable backticks syntax instead. (Or just change your shell appropriately).

  2. Log in to comment