Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Shell scripting with zsh with unknown path




I have always written my shell scripts in #!/bin/sh or #!/bin/bash but there are times when I find that I would really prefer to use zsh.

Ideally I'd like to be able to write all of my scripts in zsh so I don't have to keep two syntax/feature sets in my head.

The problem is that I don't always know where zsh will be installed. It could be /usr/bin/zsh or /usr/local/bin/zsh or /bin/zsh.

I have seen perl scripts which have used

    #!/usr/bin/env perl

but that did not seem to work for zsh.

TjL





Messages sorted by: Reverse Date, Date, Thread, Author