z/OS Tools & Language

Expand all | Collapse all

GIT release notes explanation required please

  • 1.  GIT release notes explanation required please

    Posted 02-09-2018 20:06

    While I have 40 years experience with standard MVS I still have problems understanding some of the language used in USS.

    The GIT release notes has a “Sample shell code (for .bashrc)” , the first line says

     # This must be sourced, not run
    

    Can someone explain to me what “sourced” means ?

    Regards,
    Gary



  • 2.  RE: GIT release notes explanation required please

    Posted 02-12-2018 07:44

    Hello Gary!
    In this case it means that you’re not supposed to run .bashrc script as
    $ ./.bashrc
    but instead run it like
    $ source .bashrc
    Here is a good explanation of the difference here

    With respect, Dan.



  • 3.  RE: GIT release notes explanation required please

    Posted 02-12-2018 08:26

    Thanks Dan. The explanation is excellent.



  • 4.  RE: GIT release notes explanation required please

    Posted 02-13-2018 14:39

    Does “source” work for everyone? It does not work for me? I have to use the “dot” version. Specifically, if I do the following:
    source /u/dvfjs/swift-4/etc/profile
    I get an error: source: FSUM7351 not found. On the other hand, this works:
    . /u/dvfjs/swift-4/etc/profile

    I just realized that bash is not my default shell, so I guess the default shell (whatever that is) does not support “source”. Can a user change their default shell?



  • 5.  RE: GIT release notes explanation required please

    Posted 02-14-2018 04:10

    Hi,

    You can change your login shell with this tso command:

    tsocmd alu your_login omvs(program(’/path/to/bash/bin/bash’))



  • 6.  RE: GIT release notes explanation required please

    Posted 02-14-2018 12:14

    Thanks for the info. As an application developer I do not have ALTUSER access, even for myself. Oh well!



  • 7.  RE: GIT release notes explanation required please

    Posted 11-16-2018 15:38

    I am late to the game, but if you want to use bash as your login shell, add the following line to the end of your startup shell script (mine is .profile).

    exec bash

    This has been working well for me.



  • 8.  RE: GIT release notes explanation required please

    Posted 02-16-2018 09:38

    bash understands both, source and . (dot). /bin/sh understands . (dot) only, and /bin/tcsh understands source only.