{"id":13806,"date":"2021-12-14T02:20:16","date_gmt":"2021-12-14T02:20:16","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=13806"},"modified":"2021-12-14T02:21:57","modified_gmt":"2021-12-14T02:21:57","slug":"spawn-command-not-working-in-unix","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/spawn-command-not-working-in-unix\/27383.html","title":{"rendered":"Spawn Command Not Working In Unix."},"content":{"rendered":"<p>I am connecting to an external client using sftp.<\/p>\n<p>i gave the following command<\/p>\n<p>#!\/usr\/bin\/expect -f<\/p>\n<p>spawn sftp username@hostname<\/p>\n<p>expect &#8220;password: &#8221;<br \/>\nsend &#8220;xxxxx&#8221;<\/p>\n<p>expect sftp&gt;<br \/>\n&#8230;<br \/>\n&#8230;<\/p>\n<p>but the command was not working.<\/p>\n<p>The Error is :<\/p>\n<p>spawn: command not found<br \/>\ncouldn&#8217;t read file &#8220;password:&#8221;: no such file or directory<br \/>\nsend: command not found<br \/>\ncouldn&#8217;t read file &#8220;sftp&gt;&#8221;: no such file or directory<br \/>\nsend: command not found<br \/>\ncouldn&#8217;t read file &#8220;sftp&gt;&#8221;: no such file or directory<br \/>\nsend: command not found<\/p>\n<p>Kindly help asap, with some other options.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":23},"question-category":[55],"question_tags":[],"class_list":["post-13806","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/13806","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=13806"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=13806"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=13806"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=13806"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}