[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 6

yes Command

Purpose

Outputs an affirmative response repetitively.

Syntax

yes [ Expletive ]

Description

The yes command outputs an affirmative response repetitively. Use the yes command as piped input to another command that requires an affirmative response before it completes the specified action. For example, the yes command is useful when deleting multiple files from a directory. The Ctl-C key sequence terminates the continuous affirmative responses.

Note: The current locale is determined by the LC_MESSAGES environment variable or the Expletive parameter, if specified. The Expletive parameter can be any single character or character stream. If you enter an Expletive parameter after issuing the yes command, the Expletive parameter displays to the screen until you type the Ctl-C key sequence.

Examples

  1. To delete all files in a directory and automatically send an affirmative response to the question Remove these files? , enter:
    yes | del *
    This statement displays the names of the files deleted by the delete command.
  2. To display the word first to the screen, enter:
    yes first
    This statement displays the word until you enter the Ctl-C key sequence.

File

/usr/bin/yes
Contains the yes command.
                          

Related Information

The environment file.

Shells Overview in AIX Version 4.3 System User's Guide: Operating System and Devices.


[ Previous | Next | Contents | Glossary | Home | Search ]