Create a bash file for transfer file through tftp
<p>I want to create shell script to invoke tftp transfer of particular file to my local machine</p>

<p>this is the operation i want to do</p>

<pre><code>tftp 172.2.22.2
get file1_in_remote location file2_in_local_machine
quit
</code></pre>

<p>but I can't make it work, because when the 1st <strong>tftp</strong> command executes, control will got to tftp prompt. its just loook like this</p>

<pre><code>tftp&gt;
</code></pre>

<p>And it wont accept the 2nd and 3rd commands i have given in the shell script.</p>

<p>but when I exit from the <strong>tftp</strong> prompt, bash prints an error message like</p>

<pre><code>get: command not found
quit: command not found
</code></pre>

<p>So How can I get it done</p>

<p><strong>EDIT1</strong>: </p>

<pre><code>tftp 173.32.52.12 -c get MyFile1.txt MyFile2.txt
tftp 173.32.52.12 -c get MyFile1.txt MyFile2.txt MyFile3.txt etc. etc.
</code></pre>

<p>these 2 commands not working with my ubuntu(14.0.4) system</p>