-1

I have been trying to run the following command but it gives me the following error but when I type command in terminal it runs, how to fix this

Command:

host=''
user=''
pass=''
path='path'
srcfile='file.txt'
lftp -u $user,$pass $host   << --EOF--
set ssl:verify-certificate no
put $srcfile
quit

Error:

enter image description here

Cyrus
  • 84,225
  • 14
  • 89
  • 153

1 Answers1

2

If you told shell that you're using here document you have to tell it where it ends:

lftp -u $user,$pass $host   << --EOF--
set ssl:verify-certificate no
put $srcfile
quit
--EOF--
Arkadiusz Drabczyk
  • 11,227
  • 2
  • 25
  • 38