Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • 4
    Or don't change the system's default shell. Just set your personal login shell to bash. Commented Feb 17, 2017 at 16:18
  • @OrangeDog - heh, yeah, fully agree, But you never know what another developer will do when working as a team. And better be safe. And, yes, it did happen to me to run a script with the wrong shell because someone else changed it :) Commented Feb 17, 2017 at 17:11
  • Don't give them root access if you can't trust them not to change the system shell. Commented Feb 17, 2017 at 17:12
  • I am not the AIX operation system admin. I am just a supporter for an application system. As I don't have the root permission, I don't have to worry about changing the system default shell. Just out of curiosity, in scripts, the first shebang line should always specify which shell to use, why it can still cause 'run a script with the wrong shell' issue? Commented Feb 17, 2017 at 17:18
  • @0PT1MU5PR1ME - Someone may think that it would be good to have bash as the default for new users and (instead of changing the skeleton) symlink /bin/sh to /bin/bash. The you test the script and all works. But, on a new (or production, or client, machine) /bin/sh would be symlinked to /bin/ksh as the is the default that IBM sets on new machines. Commented Feb 17, 2017 at 18:08