Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Zsh option for checking if a file is a shell script
- X-seq: zsh-users 15267
- From: Guillaume Brunerie <guillaume.brunerie@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Zsh option for checking if a file is a shell script
- Date: Thu, 12 Aug 2010 12:23:00 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=DG5kqvSCZXLGyITUsW9T6PNofnOFsw3+LI4p8Xh0MsI=; b=Tbb9+troevz8mF8XwbOL/xHSdzacsG+iOaVJkRseRbMYWbJoIYf96iV5y66NmtbWHn +gFrxYPqBbdD7b1X3TN/dBg7YcUb1ZLplKHiQtZj+6yIOrDW2swvLo8N9gG29ylOcAez MitSjvFA0vtYsvKr5rDe38uyTVUhvBH5nXiuM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=DLdMDxRCo2XPZ32/OrYb7al4pFpHK/uEx1Q2eGavNKNHGh/WOiSc+Ofdf8olA0cTiD kJwgyf1EwrYYtrMEtqpIahIm09TdSH3NcbOU6NVT25TH/5N1R8kTj/O2aVK9vn6/Sy0X C71Eublv4hDesjyMFD6vW9bTbfhfd3LWvuEr8=
- 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
Hi,
Is there some option (for example --check-syntax) such that
$ zsh --check-syntax /path/to/a/shell/script
doesnât do anything except that the return code would be 0
if /path/to/a/shell/script is indeed a shell script, and non zero otherwise?
(in particular I donât want to execute the shell script at all)
I want to know if a given file is a shell script or not, and I cannot use
the extension or the shebang because some files (e.g. /etc/zprofile) doesnât
have any of them.
Thank you.
Guillaume Brunerie
Messages sorted by:
Reverse Date,
Date,
Thread,
Author