How to send multiple commands to sftp using one line

view story

http://unix.stackexchange.com – The following command sends one command to sftp using one line: sftp -o PasswordAuthentication=no user@host" <<<"lcd /home" How to send multiple lines to sftp using one line. Is there a way to insert carriage returns or something to achieve this, for example: sftp -o PasswordAuthentication=no user@host" <<<"lcd /home\n cd /myhome\n get file" The idea is to NOT use the sftp -b option where an external file listing commands is loaded. (HowTos)