Menu

Tree [d232bb] master /
 History

HTTPS access


File Date Author Commit
 COPYING 2017-09-19 Oleksiy Chernyavskyy Oleksiy Chernyavskyy [878c64] initial files
 README 2017-09-20 Oleksiy Chernyavskyy Oleksiy Chernyavskyy [f7d718] README: updated
 cmdok 2018-10-25 Oleksiy Chernyavskyy Oleksiy Chernyavskyy [d232bb] Fixed BASH test header

Read Me

Command validation tool

### Description

**cmdok** checks that specified commands are OK. If command is OK than it exists in PATH and can be run. 
It is a simple, small and portable Bash script. It is useful in software packages that want to check that some commands exist before trying to run them.


### Example

~~bash
$ cmdok gcc
checking gcc ... OK

$ cmdok install tar gzip ar clang
checking install ... OK
checking tar ... OK
checking gzip ... OK
checking ar ... OK
checking clang ... OK
~~

**cmdok** retruns '0' on success. It can be used in scripts that check commands before running them. Example:
~~bash
if cmdok -f install; then
  install ...
else
  exit 1
fi
~~


### Usage

~~
cmdok [OPTIONS] <command>..

Options:
  -n             disable printing any status
  -f             print status only on fail
  -v             display version information and exit
  <command>..    commands to check
~~