This

./script.sh

is different from

. ./script.sh

The latter is simply

. script.sh

which is to say "evaluate this file in the shell".  It shouldn't do what
you want in the other shells either, although they may be more compatible
making you think it worked.  If you want to run a script (as opposed to
sourcing it) do just that,

./script.sh

and if it's executable and has a shebang it will work just fine in fish.

Hope that helps!


On Thu, May 23, 2013 at 7:58 PM, John Chludzinski <
john.chludzin...@gmail.com> wrote:

> Example:
>
> fish: Unknown command “SSH_TEMPLATE=ssh”. Did you mean “set
> SSH_TEMPLATE ssh”? For information on assigning values to variables,
> see the help
> section on the set command by typing “help set”.
> /home/john.chludzinski/work/dtngksh/dtng_env.ksh (line 357):
> SSH_TEMPLATE=ssh
>
> On Thu, May 23, 2013 at 1:29 PM, John Chludzinski
> <john.chludzin...@gmail.com> wrote:
> > If I execute from within ksh a file with shabang: #!/bin/sh, it will
> > use the Bourne shell. With #!/bin/bash, it will use bash, and so on
> > using:
> >
> > ./script.sh
> >
> > I tried from within fish:
> >
> > . ./script.sh   # . - evaluate contents of file.
> >
> > with shabang #!/bin/ksh
> >
> > and got a train load of errors because it (i.e., the fish shell) tried
> > to "evaluate contents of file" as a fish shell script (ignoring the
> > shabang: #!/bin/ksh).
> >
> > ---John
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
> _______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users
>
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to