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.

stdout/stderr in variable einlesen

Empfohlene Antworten

Veröffentlicht

kennt jemand einen weg wie man den stdout und stderr von nem script oder programm in eine variable leiten kann?

ich kenns nur mit ">" und "2>" aber das geht ja dann nur ein eine datei.

für ideen wäre ich dankbar :eat: :D

hm das weiss ich ja. aber das brint mir nüscht

wie kann ich denn den stout in ne variable umleiten.

also nicht mit var= oder export var=

vielleicht gibts das ja auch garnet

ich dachte an sowas in der art.

blalabla > $var oder sowas in der art.

war ja nur so ne idee ob das geht, ich wüsste nämlich jetzt keine lösung :eek:

Hallo shutdown-Frnow,

Schlaubi hat doch schon die Lösung gesagt:

var=$(echo "test" 2>&1); echo "stderr oder stdout: $var"

So ist der stdout und stderr in einer Variable.

Wieso willst du das nicht mit var= machen?

cya

alligator

ach ich bin dabei n frontend für eins meiner scripte mit "dialog" zu machen.

leider öffnet sich der dialog nicht wenn ichs mit export var= oder var= mache :( deshalb hab ich anch was anderem gesucht

naja, habs jetzt so gelöst:


dialog --inputbox "Welcher Server?" 5 30 localhost 2>/tmp/bubu; export SERVER=`cat /tmp/bubu`;rm /tmp/bubu;

ist zwar irgendwie behindert, aber es klappt ... damit muss ich erstmal leben :pssst:

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.