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.

0

1 Answer 1

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".

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.