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

Re: A short form for if-then-else



* Anonymous bin ich <ichbinanon@xxxxxxxxx> [2009-10-15 18:36 +0200]:
> I want to check if a program (mailx) is present or not. If present,
> the program will be run, if not, an error message should be printed.
> No other message should be printed.

if whence mailx >/dev/null; then mailx; else echo "not found"; fi



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