exec

Usage

exec expression [expression ...]

Aliases

system

Description

This command executes given expression(s) as a system command and returns the exit code.

Example 29. Count words in "hallo wold" string, then print name of your machine's operating system.

exec echo hallo world;             # prints hallo world
exec "echo hallo word" | wc;       # counts words in hallo world
exec uname;                        # prints operating system name