chsh changes your user profile's default shell that you log into every time you ssh in.
If you add a shebang, then you are loading your previous shell bsh and then forking a process to run bash while bsh waits occupying memory and doing nothing.
You can try it and see this easily using the ps command, e.g., if your user is stageson, then

ps -ef | grep stageson

and you can see all your processes.

________________________________
From: OpenSource <opensource-bounces@xxxxxxxxxxxxxxxxxx> on behalf of stefan@xxxxxxxxxx <stefan@xxxxxxxxxx>
Sent: Wednesday, March 26, 2025 01:09
To: 'IBMi Open Source Roundtable' <opensource@xxxxxxxxxxxxxxxxxx>
Subject: Re: [IBMiOSS] Do worry - Python newbie calling

Thanks!
Now the source command works as expected.
What is the difference between using chsh and adding a shebang to the .profile file?

Best regards

Stefan



Jack Woehr
Independent Consulting Programmer

303-847-8442

jack.woehr@xxxxxxxxxxx

www.procern.com

Stay Connected!

Not Just MSP, We Also MSSP.

 NON-DISCLOSURE NOTICE: This communication including any and all attachments is for the intended recipient(s) only and may contain confidential and privileged information. If you are not the intended recipient of this communication, any disclosure, copying further distribution or use of this communication is prohibited. If you received this communication in error, please contact the sender and delete/destroy all copies of this communication immediately.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.