zsh-users
 help / color / mirror / code / Atom feed
* Zsh option for checking if a file is a shell script
@ 2010-08-12 10:23 Guillaume Brunerie
  2010-08-12 16:12 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Guillaume Brunerie @ 2010-08-12 10:23 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-16 20:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-12 10:23 Zsh option for checking if a file is a shell script Guillaume Brunerie
2010-08-12 16:12 ` Bart Schaefer
2010-08-16 20:52   ` Guillaume Brunerie

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).