in reply to Re: system & exec
in thread system & exec

I find it hard to believe their /bin/sh understands . but not source.

Replies are listed 'Best First'.
Re^3: system & exec
by afoken (Chancellor) on Jul 29, 2018 at 08:00 UTC
    I find it hard to believe their /bin/sh understands . but not source.

    source is a bashism. Having a /bin/sh that behaves like a bash is pure luck. Linux had bash as default shell for a long time, but even on Linux, you can't rely on that any more. The *BSDs and commercial Unixes have changed their default shells several times. See https://www.in-ulm.de/~mascheck/various/shells/ for details.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re^3: system & exec
by hippo (Archbishop) on Jul 28, 2018 at 19:57 UTC
    $ cat yangsource.pl #!/usr/bin/env perl use strict; use warnings; system 'source ./script.sh'; $ ./yangsource.pl Can't exec "source": No such file or directory at ./yangsource.pl line + 5. $

    I find your lack of faith disturbing