Skip to content

Instantly share code, notes, and snippets.

@vain
Created December 11, 2010 18:59
Show Gist options
  • Save vain/737572 to your computer and use it in GitHub Desktop.
Save vain/737572 to your computer and use it in GitHub Desktop.
Hey,
du kannst auch explizit das Terminal nochmal öffnen mit /dev/tty. Kann
zum Beispiel so aussehen:
(read -p 'Gib ein: ' -r line < /dev/tty; echo "$line") < ~/.bashrc
Stdin ist eigentlich umgeleitet aus der ~/.bashrc, aber trotzdem kommst
du zur Abfrage und kannst auch etwas eingeben. :)
/dev/stdin musst du auch eigentlich nicht explizit angeben. Das cat erbt
ohnehin Stdin vom Elternprozess, also sind die beiden hier gleichwertig:
cat > hurz
cat < /dev/stdin > hurz
Cheers!
PS.: War dein Blog nicht mal im UbuntuUsers-Planeten? Oder kommt da nur
nichts mehr an?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment