Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to send yes/no with dialog box in bash shell

Featured Replies

Hi.

I am digging many things with armbian so I install fresh armbian and many applications so many times.

So I am making a long script to install many applications and edit many configuration.

When it asked "Yes/On" on text prompt, I use "#echo yes | apt install vim". It works well.

But when I install samba, it ask text prompt "yes/no" at first and then with dialog box "yes/no".

So I tried "#echo yes | echo no | apt install samba". But it doesn't work.

How can I send "yes/no" to dialog box in bash shell??

 

5 hours ago, kimwida said:
When it asked "Yes/On" on text prompt, I use "#echo yes | apt install vim". It works well.

But when I install samba, it ask text prompt "yes/no" at first and then with dialog box "yes/no".

So I tried "#echo yes | echo no | apt install samba". But it doesn't work.

How can I send "yes/no" to dialog box in bash shell??

 

 

I dont know if it works for a samba-dialog-box, but you could try the following options with apt-get (not only apt):
 

root@npi-neo2-22(192.168.6.22):~# man apt-get|grep yes
       -y, --yes, --assume-yes
           Automatic yes to prompts; assume "yes" as answer to all prompts and run non-interactively. If an
           Force yes; this is a dangerous option that will cause apt to continue without prompting if it is
           Force yes; this is a dangerous option that will cause apt to continue without prompting if it is
       --force-yes
           Force yes; this is a dangerous option that will cause apt to continue without prompting if it is
           force-yes can potentially destroy your system! Configuration Item: APT::Get::force-yes. This is
           --assume-yes; where --assume-yes will answer yes to any prompt, --trivial-only will answer no.

So without echo you could try

apt-get install vim -y

or

apt-get install vim --force-yes

 

  • Author

Sadly, I have to choose "yes" at first and then "no".

Now I have to wait and hit "Enter" for samba install.

But it saves a lot of time for me.

 

Anyway thank you, I solved a lot of problems from your replies.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.