LoginSignup
10
9

More than 5 years have passed since last update.

yesコマンドでnoを出力させる

Posted at

yesコマンドはy/n入力を省略するために使いますが、オプションがあることに気がついた。

引数に出力させたい文字を指定する
$ yes no
no
no
no
no
日本語もいける
$ yes "進捗だめです"
進捗だめです
進捗だめです
進捗だめです
進捗だめです
man
$ man yes                                                                                                                                                                         [master]

YES(1)                    BSD General Commands Manual                   YES(1)

NAME
     yes -- be repetitively affirmative

SYNOPSIS
     yes [expletive]

DESCRIPTION
     yes outputs expletive, or, by default, ``y'', forever.

HISTORY
     The yes command appeared in 4.0BSD.

4th Berkeley Distribution        June 6, 1993        4th Berkeley Distribution
10
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
9