N
N
nihi1ist2020-11-03 19:06:59
bash
nihi1ist, 2020-11-03 19:06:59

How to add yes/no input in bash?

I started to learn bash and a couple of questions appeared in which Google did not help:

  1. How to add a question-action to the script, so that if the answer is positive (press Y), text is added to the line, if the answer is negative (press N), continue without adding text? So I found an option , but I did not understand how to adapt it correctly.
  2. Is it possible to make prompts in Russian if Russian is the main language in the console, otherwise the prompts are in English?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
FanatPHP, 2020-11-03
@FanatPHP

Google didn't help

What am I doing wrong?

M
Mikhail Vasilyev, 2020-11-03
@vasilyevmn

1 line on google query
https://stackoverflow.com/questions/226703/how-do-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question