A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 9 Ω


Bash Python Pipe


Programmieren


Basiswissen


In der Shell-Programmiersprache Bash kann auch die Programmiersprache Python aufgerufen werden. Hier steht dazu ein Beispiel.
s

Beispiel 1


echo "print (10**(-1))" | python
Gibt 0.1 aus

Beispiel 2


echo "print (10//3)" | python
Rundet auf ganze Zahlen ab, also 3

echo "print (10%3)" | python
Gibt Divisionsrest aus, also 1