Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ./pkg-search.sh: 2: ./pkg-search.sh: Bad substitution in a shell script -
- X-seq: zsh-users 22690
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: shirish शिरीष <shirishag75@xxxxxxxxx>
- Subject: Re: ./pkg-search.sh: 2: ./pkg-search.sh: Bad substitution in a shell script -
- Date: Mon, 8 May 2017 22:29:17 +0000
- Cc: zsh-users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=2amHik5Ka9BqPGiBcjHOJvs0iMTyds2d9T4FbNSSdPA=; b=qEWDwLjp tU3WkDyBJSS69/r2M/rchsGRLQmmpqEUB3OZJzZ++rei51ag8VtuZ5oqV2t4V906 UA8pDvQQylJVvGPCIl/9kAS5FSNmzNlmTzLFKkQAjdKc6s59MfnXho5RGx8xls4P WjUUxVH4wNN+zIPYo278gy9T54UaZtoVdKIddAHZbdpTfQJkco+T2S5W+LK4IYua mxERYglXWgPxJdxeqBla4Mx6zq3zaxUm4l1uoaH+pgVB4ohSEcAV8J2OPuzazshA eEImgBMr+KRr+F5ZbuilEZNqaB6cCVE27AIr7tIKTgZHAPubTMKnhAsk6x2tFnNF c5lzxv7/F2S9rg==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=2amHik5Ka9BqPGiBcjHOJvs0iMTyds2d9T4FbNSSdPA=; b=NUPRrUnu /tlyk4KD269oKrMV8rLRI4GURoHSAUGy/1DGW7F7PPbwbrGPPQMwVrSU2AHnkHDr AM9bIa0TYlbPHkgGEzUKeDiO+/xwQ2m7e6YVDgYmV6u5mD6JwKmCxI+odGwdK8Jh FQWv6CZm4b2+8POX9WpSb0Edc6fX6ddEhEW0Rexq8kslfci49Ble745/4Dxw+yCc zVrjUeVBc4TNBnHD2COrcX3os/0WWxy4HOcXaH/iaTNSIM2jQ10DnHCVuuytpagY hbX7/OOPGWyKQi3Rt105noWqxSHBbEh8/MJPaxsiERqmQANWKf5b4AFc8b3y3G0Y YbUBNph/yvLXtA==
- In-reply-to: <CADdDZRmRA=M2kLc7zFEU5peUiVQUorRN=EQeLwDTbtOpS9Ox+A@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CADdDZRmRA=M2kLc7zFEU5peUiVQUorRN=EQeLwDTbtOpS9Ox+A@mail.gmail.com>
shirish शिरीष wrote on Tue, May 09, 2017 at 02:28:15 +0530:
> ─[$] cat pkg-search.sh
> 1 for file in /usr/share/doc/*/changelog.Debian.gz; do
> 2 package=${file:15}
> Trying to run the script under zsh I get the following -
>
> [$] ./pkg-search.sh
> ./pkg-search.sh: 2: ./pkg-search.sh: Bad substitution
That runs the script under sh. To run it under zsh, add
#!/usr/bin/env zsh
as the first line of the script.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author