public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* #!/bin/sh and #!/bin/bash is not the same
@ 2016-08-20 21:32 Morten Kjærulff
  2016-08-20 21:54 ` Hans-Bernhard Bröker
  2016-08-22 13:54 ` cyg Simple
  0 siblings, 2 replies; 7+ messages in thread
From: Morten Kjærulff @ 2016-08-20 21:32 UTC (permalink / raw)
  To: cygwin

Hi,

I thought that #!/bin/sh in a script would be a bash, but it seems not
to be - or what am I doing wrong?

vp01mkf@DX305 ~/bin
$ cat ./tsh.sh
#!/bin/sh

cat < <(pwd)

vp01mkf@DX305 ~/bin
$ ./tsh.sh
./tsh.sh: line 3: syntax error near unexpected token `<'
./tsh.sh: line 3: `cat < <(pwd)'

vp01mkf@DX305 ~/bin
$ cat ./tbash.sh
#!/bin/bash

cat < <(pwd)

vp01mkf@DX305 ~/bin
$ ./tbash.sh
/home/vp01mkf/bin

vp01mkf@DX305 ~/bin
$ diff tsh.sh tbash.sh
1c1
< #!/bin/sh
---
> #!/bin/bash

vp01mkf@DX305 ~/bin
$ ls -l /bin/sh /bin/bash
-rwxr-xr-x 1 vp01mkf Domain Users 757277 Aug  6 14:56 /bin/bash
-rwxr-xr-x 1 vp01mkf Domain Users 757277 Aug  6 14:56 /bin/sh

vp01mkf@DX305 ~/bin
$

/Morten

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-08-23 17:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-20 21:32 #!/bin/sh and #!/bin/bash is not the same Morten Kjærulff
2016-08-20 21:54 ` Hans-Bernhard Bröker
2016-08-22 13:54 ` cyg Simple
2016-08-22 16:04   ` Morten Kjærulff
2016-08-22 20:50     ` cyg Simple
2016-08-22 23:13       ` Morten Kjærulff
2016-08-23 22:19         ` cyg Simple

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).