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.

Required fields*

5
  • correct me if I'm wrong but won't just sourcing the file not bring the functions into the env of the bash shell that sourced it? Your right I only need it for interactive bash (and possibly some of my scripts) but I was under the impression that they needed to be exported to be used interactively? Commented Jun 14, 2019 at 16:19
  • @profPlum no, not at all. You only need to export them if you will need them in child shells launched by your main one. Does not exporting solve it? Kudos to Bodo, if so, but that's really surprising since exported functions won't be carried over to the remote shell you ssh into. Commented Jun 14, 2019 at 16:38
  • @terdon: I have the roughly the same setup on both machines (similar .bashrc and same .bash_aliases). So that is why they 'carry'. Also that is good to know, I will try that now and see what happens. Commented Jun 14, 2019 at 16:57
  • @profPlum to assuage my curiosity, could you give an example of when this was happening? I can't reproduce through ssh. Did you only see these messages on your local machine or when running a script? Commented Jun 14, 2019 at 17:05
  • Bodo: thanks that worked! didn't know I didn't need to export :) @terdon: also thanks for your help & extra effort, I would upvote you but I don't have the reputation to do it. If I get that rep soon I will. Both of you have a good day! :) Commented Jun 14, 2019 at 17:06