public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrey Repin <anrdaemon@yandex.ru>
To: "Morten Kjærulff" <mortenkjarulff@gmail.com>, cygwin@cygwin.com
Subject: Re: #!/bin/sh vs #!/bin/bash filename expansion after <
Date: Wed, 12 Aug 2020 23:07:33 +0300	[thread overview]
Message-ID: <101867550.20200812230733@yandex.ru> (raw)
In-Reply-To: <CA+7cx1rLR-s9vEu587aUycQ6GqNBLTYaeXL4Q7Ff6GNAJ4pNow@mail.gmail.com>

Greetings, Morten Kjærulff!

> This script:

> #!/bin/sh
> echo hello >hello.txt
> ls -l
> cat hell*
> cat < hell*

> gives me:

> $ ./t.sh
> total 2
> -rw-r--r-- 1 vp01mkf Domain Users  6 Aug 12 19:51 hello.txt
> -rwxr-xr-x 1 vp01mkf Domain Users 60 Aug 12 19:51 t.sh
> hello
> ./t.sh: line 5: hell*: No such file or directory

> But if I change line1 to
> #!/bin/bash
> I get
> hello
> hello

> Is that correct behaviour. I guess so, but why? And what is the rule?

d2u t.sh
???


-- 
With best regards,
Andrey Repin
Wednesday, August 12, 2020 23:07:08

Sorry for my terrible english...

  parent reply	other threads:[~2020-08-12 20:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-12 17:54 Morten Kjærulff
2020-08-12 18:24 ` Eliot Moss
2020-08-12 20:07 ` Andrey Repin [this message]
2020-08-12 20:53   ` Eliot Moss
2020-08-12 21:07 ` Ken Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=101867550.20200812230733@yandex.ru \
    --to=anrdaemon@yandex.ru \
    --cc=cygwin@cygwin.com \
    --cc=mortenkjarulff@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).