0

I was just reading my friend's shell script file and I happen to run within this command

ssh yote@user << EOF
  cd tests
  tar -xf $TARGET_TEST.tar
  rm $TARGET_TEST.tar
  cd $TARGET_TEST
  *more stuff goes here*
EOF

I was just wondering what does the EOF mean in the use case. I only know that it is an initialism for "End-of-file" but there were more lines after the second EOF.

ripa
  • 1

1 Answers1

3

https://www.tldp.org/LDP/abs/html/here-docs.html

That is called a "here document". In this case the text within the EOFs are commands for the remote server named "user".

JamesL
  • 1,270
  • 1
  • 14
  • 19