[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inconsistent treatment of backslash-bang
From: |
Lawrence D'Oliveiro |
Subject: |
Re: inconsistent treatment of backslash-bang |
Date: |
Sat, 19 Jul 2008 17:29:37 +1200 |
User-agent: |
Microsoft-Outlook-Express-Macintosh-Edition/5.0.6 |
Paul Jarc wrote:
> Lawrence D'Oliveiro <ldo@geek-central.gen.nz> wrote:
>> pk wrote:
>>> This is documented in man bash, and only happens in interactive shells (not
>>> scripts).
>>
>> I just tried putting my six cases into a script, and I get exactly the same
>> sort of output as interactively.
>
> How did you invoke the script? If you do ". ./script", then the
> script commands are being run in the interactive shell, so you'll get
> the same behavior as if you typed them directly. "./script" will run
> those commands in a new, non-interactive shell.
I spoke too soon...
ldo@theon:hack> cat shriek_try
#!/bin/bash
echo "hi there!0"
echo "hi there\!0"
echo hi there\!0
echo "hi there$0"
echo "hi there\$0"
echo hi there\$0
ldo@theon:hack> ./shriek_try
hi there!0
hi there\!0
hi there!0
hi there./shriek_try
hi there$0
hi there$0
- Re: inconsistent treatment of backslash-bang, (continued)
- Re: inconsistent treatment of backslash-bang, pk, 2008/07/16
- Re: inconsistent treatment of backslash-bang, Lawrence D'Oliveiro, 2008/07/18
- Re: inconsistent treatment of backslash-bang, Lawrence D'Oliveiro, 2008/07/18
- Re: inconsistent treatment of backslash-bang, Lawrence D'Oliveiro, 2008/07/18
- Re: inconsistent treatment of backslash-bang, pk, 2008/07/18
- Re: inconsistent treatment of backslash-bang, Lawrence D'Oliveiro, 2008/07/19
- Re: inconsistent treatment of backslash-bang,
Lawrence D'Oliveiro <=
- Re: inconsistent treatment of backslash-bang, Lawrence D'Oliveiro, 2008/07/20
- Re: inconsistent treatment of backslash-bang, Lawrence D'Oliveiro, 2008/07/20
- Re: inconsistent treatment of backslash-bang, Lawrence D'Oliveiro, 2008/07/22
- Re: inconsistent treatment of backslash-bang, pk, 2008/07/22
- Re: inconsistent treatment of backslash-bang, Lawrence D'Oliveiro, 2008/07/23
- Re: inconsistent treatment of backslash-bang, pk, 2008/07/23