How Dockfile commands executed in .sh

There Dokefile file similar to the following. 
. 1
the RUN CD / tmp / Patch \ 2 && RM -rf / usr / local / to python3. . 5 / lib / to python3. . 5 /site-packages/moduleA/a.* \ . 3 && CP . /a.pyc / usr / local / to python3. . 5 / lib / to python3. . 5 / Site-Packages / ModuleA

I want to achieve the above functions with A.sh file, how to do it?

  #! /bin/sh

  cd /tmp/patch \

&& rm -rf /usr/local/python3.5/lib/python3.5/site-packages/moduleA/a.*  \
&& cp ./a.pyc /usr/local/python3.5/lib/python3.5/site-packages/moduleA

 

The above "\" represents a continuation character, && represented by the foregoing can execute later.

.Sh file written in the windows, run into linux, the report found problems "\ r", and later adopted: set ff = unix way to get rid of.

 

In Unix, who is #! Comment, all is the path loader (interpreter) of. If you do not write, they will have their own default path.

Guess you like

Origin www.cnblogs.com/Stephen-Qin/p/11299992.html