Skip to content

Instantly share code, notes, and snippets.

@NielsLiisberg
Last active June 5, 2020 14:12
Show Gist options
  • Save NielsLiisberg/37c4979e841d57f91d804ca1d52eb884 to your computer and use it in GitHub Desktop.
Save NielsLiisberg/37c4979e841d57f91d804ca1d52eb884 to your computer and use it in GitHub Desktop.
SQL Set bash as your default shell
-- install bash
cl: qsh cmd('yum install bash');
-- If you don't have a profil yet, then add the open source path to your default path
cl: qsh cmd('touch $HOME/.profile');
cl: qsh cmd('setccsid 1252 $HOME/.profile');
cl: qsh cmd('echo ''PATH=/QOpenSys/pkgs/bin:$PATH'' >> $HOME/.profile');
cl: qsh cmd('echo ''PS1="\\h-\\$PWD:\\n"'' >> $HOME/.profile');
-- Finally set bash as the default shell
CALL QSYS2.SET_PASE_SHELL_INFO('*CURRENT', '/QOpenSys/pkgs/bin/bash');
@forstie
Copy link

forstie commented Nov 9, 2019

--
-- Self documenting code thanks to named parameter invocation

CALL QSYS2.SET_PASE_SHELL_INFO(AUTHORIZATION_NAME => '*CURRENT',
SHELL_PATH => '/QOpenSys/pkgs/bin/bash');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment