TLDR:
Use'EOF'
$cat<<'EOF'>$USER>$(pwd)> `pwd`> EOF$USER$(pwd)`pwd`
Sometimes when we want to create a multi-line text and redirect it to the output we will usecat EOF
like this
cat<<EOF > /tmp/out line1line2EOF
and the result will be like this:
line1line2
but if we're gonna pass variables to the line, we're gonna see it works like this:
cat<<EOF > /tmp/out$USER$(pwd)`pwd`EOF
output:
clavinjune/tmp/tmp
if we want to keep the variables as it is we can use'EOF'
instead.
cat<<'EOF' > /tmp/out$USER$(pwd)`pwd`EOF
output:
$USER$(pwd)`pwd`
Top comments(0)
Subscribe
For further actions, you may consider blocking this person and/orreporting abuse