“Echo mehrere Zeilen verprügeln” Code-Antworten

Bash lesen mehrere Zeilen vom Benutzer

# Basic syntax:
read -d "~" -p $'Enter your text (type \"~~\" when done):\n' YOUR_TEXT
# Where:
#	- -d tells read to continue reading until the specified delimiter is read.
#		Here I use ~ as the delimiter
#	- -p indicates what to prompt when the script asks for input. I include a
#		message to indicate what to type to stop reading. (I say ~~ because in
#		my shell, I always seem to have to press it twice to stop reading)
#	- YOUR_TEXT is the bash variable that will get the input text 
Charles-Alexandre Roy

Bash Multiline Ech

cat <<EOT >> my_file.txt
my text line 1
my text line 2
EOT
Dangerous Dragonfly

Echo mehrere Zeilen verprügeln

# This will output whatever is between the EOF tokens.
cat << EOF
usage: up [--level <n>| -n <levels>][--help][--version]

Report bugs to: 
up home page:
EOF

# You could change the EOF to whatever you want. For example:
cat << MY_TOKEN
bluh
bluh 
bliy
MY_TOKEN
Powerful Puma

Ähnliche Antworten wie “Echo mehrere Zeilen verprügeln”

Fragen ähnlich wie “Echo mehrere Zeilen verprügeln”

Weitere verwandte Antworten zu “Echo mehrere Zeilen verprügeln” auf Shell/Bash

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen