Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

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.

shellscript: 5 sek auf eingabe warten

Empfohlene Antworten

ja, ich weis. Das ist ein Script was einem im net wahrscheinlcih geradezu hinterhergeschmissen wird. aber Meine Nerven liegen blank... ich komm nicht drauf...

das script soll 5 sekunden auf eine eingabe warten, falls keine eingabe beenden, wenn eingabe da, dann weiter...

Ich hab versucht das inna "while-schleife" zu machen wo nen "sleep 5" und ein "read variable" drin steht. aber ich krieg's nciht hin...

verdammt so schwer ist das nicht!

HILFE!!!

oje oje ... "man read" ... schonmal gehört :mod:

"read -t 5 deine_tolle_variable"

wartet 5 sekunden ob es eine eingabe gibt oder nicht

@shutdown-Frnow: Den Ton fand ich etwas überzogen.

Hallo,

na, na - nicht verzweifeln ;)

Dein Ansatz war doch garnicht so schlecht....

z.B. mit:


REPLY="";

read -p "continue? [Y/n]" -t 5

echo $REPLY;     # debug

oje oje ... "man read" ... schonmal gehört :mod:

"read -t 5 deine_tolle_variable"

wartet 5 sekunden ob es eine eingabe gibt oder nicht

ja nee... das war schon berechtigt. War wirklcih was verdammt dummes... Aber ist halt öfters so, dass man auf die simpelsten sachen nicht kommt... :floet:

Danke jedenfalls, jetzt kann ich auch weitermachen!

war ja nicht bös gemeint :e@sy

:hodata ;) :cool:

oder einfach

#!/bin/bash

echo "bitte 5sek schlafen..."

sleep 5

echo "weiter gehts"

und wo kannst du da während der 5 sekunden eine eingabe machen?

überlesen :floet:

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.