Benjamin Riefenstahl said on Fri, 14 Jan 2022 10:33:29 +0100
>Hi Steve,
>
>> Benjamin Riefenstahl said on Thu, 13 Jan 2022 18:19:23 +0100
>>>Different code paths within Bash. [...]
>
>Steve Litt writes:
>> This is true, but not the explanation for this particular behavior,
>> as follows:
>>
>
Hi,
Steve Litt writes:
> Benjamin Riefenstahl said on Thu, 13 Jan 2022 18:19:23 +0100
>
>>Hi Steve,
>>
>>Steve Litt writes:
>>> [slitt@mydesk ~]$ "cat -n" /etc/fstab | cut -b 1-20 | head -n5
>>> bash: cat -n: command not found
>>> [slitt@mydesk ~]$ "cat -n /etc/fstab" | cut -b 1-20 | head -n5
Hi Steve,
> Benjamin Riefenstahl said on Thu, 13 Jan 2022 18:19:23 +0100
>>Different code paths within Bash. [...]
Steve Litt writes:
> This is true, but not the explanation for this particular behavior, as
> follows:
>
> [slitt@mydesk ~]$ /usr/bin/cat -n /etc/fstab | cut -b 1-20 | head -n5
>
Hendrik Boom said on Thu, 13 Jan 2022 18:15:28 -0500
>On Thu, Jan 13, 2022 at 12:45:09PM -0500, . via Dng wrote:
>
>>
>> The shell receives a series of tokens, and tries to interpret the
>> first one as a command. In the double-quoted attempt above, it gets
>> two tokens before the first pipe |
. via Dng said on Thu, 13 Jan 2022 12:45:09 -0500
>The shell receives a series of tokens, and tries to interpret the
>first one as a command. In the double-quoted attempt above, it gets
>two tokens before the first pipe | ---
>
> 1) "cat -n"
>
> 2) /etc/fstab
>
>Of course, the system has
Benjamin Riefenstahl said on Thu, 13 Jan 2022 18:19:23 +0100
>Hi Steve,
>
>Steve Litt writes:
>> [slitt@mydesk ~]$ "cat -n" /etc/fstab | cut -b 1-20 | head -n5
>> bash: cat -n: command not found
>> [slitt@mydesk ~]$ "cat -n /etc/fstab" | cut -b 1-20 | head -n5
>> bash: cat -n /etc/fstab: No such
On Friday 14 January 2022 at 00:15:28, Hendrik Boom wrote:
> On Thu, Jan 13, 2022 at 12:45:09PM -0500, . via Dng wrote:
> > The shell receives a series of tokens, and tries to interpret the first
> > one as a command. In the double-quoted attempt above, it gets two
> > tokens before the first pip
On Thu, Jan 13, 2022 at 12:45:09PM -0500, . via Dng wrote:
>
> The shell receives a series of tokens, and tries to interpret the first one
> as a command. In the double-quoted attempt above, it gets two tokens before
> the first pipe | ---
>
> 1) "cat -n"
>
> 2) /etc/fstab
>
> Of cour
On Wed, 2022-01-12 at 00:08 +0100, Florian Zieboll via Dng wrote:
Dear list,
this im my 'test.sh':
#!/bin/bash
for f in "$@" ; do
xcmd="unrar x"
$xcmd "$f"
done
Can please somebody explain, why, if I double-quote the "$xcmd"
variable in line 4, the script fails with
./test.
Hi Steve,
Steve Litt writes:
> [slitt@mydesk ~]$ "cat -n" /etc/fstab | cut -b 1-20 | head -n5
> bash: cat -n: command not found
> [slitt@mydesk ~]$ "cat -n /etc/fstab" | cut -b 1-20 | head -n5
> bash: cat -n /etc/fstab: No such file or directory
> [slitt@mydesk ~]$
Different code paths within B
10 matches
Mail list logo