{"id":328830,"date":"2022-01-31T09:00:36","date_gmt":"2022-01-31T09:00:36","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=328830"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=328830","title":{"rendered":"<span>\u041a\u0430\u043a \u0441\u043a\u0440\u0435\u0441\u0442\u0438\u0442\u044c \u041a\u043e\u043d\u044f \u0438 \u0422\u0440\u0435\u043f\u0435\u0442\u043d\u0443\u044e \u043b\u0430\u043d\u044c<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u00ab\u0411\u0438\u0442\u044c (Bash) \u0438\u043b\u0438 \u043d\u0435 \u0431\u0438\u0442\u044c\u00bb, &#8212; \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043b \u043e\u0434\u0438\u043d \u0414\u0430\u0442\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043d\u0446. \u0412\u043e\u0442 \u0438 \u0443 \u043c\u0435\u043d\u044f \u0432\u043e\u0437\u043d\u0438\u043a \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u0431\u043e\u0440\u043a\u0438 Bamboo. \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432 \u0437\u0430\u0434\u0430\u043d\u0438\u0438 Bamboo, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 Bash \u0438\u043b\u0438 Cmd, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 Windows \u0438 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 Linux?<\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043f\u043b\u0430\u043d\u043e\u0432 Bamboo \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 \u044f\u0437\u044b\u043a Python. \u041d\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 Windows \u0438 Linux \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0439 \u043a\u043e\u0434, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f:<\/p>\n<p>Windows:<\/p>\n<pre><code>call %PYTHON_ENV%\\Scripts\\activate.bat python \u0438\u043c\u044f_\u0441\u043a\u0440\u0438\u043f\u0442\u0430.py %bamboo_issue_key%<\/code><\/pre>\n<p>Linux:<\/p>\n<pre><code class=\"bash\">source ~\/.bash_profile source $PYTHON_ENV\/bin\/activate python \u0438\u043c\u044f_\u0441\u043a\u0440\u0438\u043f\u0442\u0430.py $bamboo_issue_key<\/code><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 Linux \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u0432 Windows \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442. \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438? \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 &#8212; \u043e\u0442\u0432\u0435\u0440\u0433\u0430\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0430\u0433\u0435\u043d\u0442\u043e\u0432? \u042f \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u043b \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 Bash \u0438 Windows command; \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u043e\u0442\u0432\u0435\u0442 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435; \u0437\u0430\u0434\u0430\u0432\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u044c\u043d\u044b\u0445 \u0441\u0430\u0439\u0442\u0430\u0445. \u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u043d\u0430 stackoverflow \u044f \u043d\u0430\u0448\u0435\u043b \u0438\u0437\u044f\u0449\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0412 Windows Cmd, \u0441\u0442\u0440\u043e\u043a\u0430, \u043d\u0430\u0447\u0430\u0442\u0430\u044f \u0441 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u00ab:\u00bb, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u043e \u043c\u0435\u0442\u043a\u0438. \u0415\u0441\u043b\u0438 \u0438\u043c\u044f \u043c\u0435\u0442\u043a\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043b\u0438 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0430 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f! \u0410 \u0447\u0442\u043e \u0432 Linux? \u0421\u0438\u043c\u0432\u043e\u043b \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 \u00ab:\u00bb, \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u0435\u043d true \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 POSIX-\u043e\u0431\u043e\u043b\u043e\u0447\u0435\u043a. \u0418\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u0432 Bash \u043d\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 true \u0438 false. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e true \u0431\u044b\u043b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u043e\u043c \u00ab:\u00bb, \u0430 false \u2014 \u0447\u0435\u043c-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 let 0.<\/p>\n<p>\u0412 Linux \u043d\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b goto. \u041d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 heredocs, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u043f\u0443\u0441\u043a \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"bash\">echo \"Run this\" cat >\/dev\/null &lt;&lt;GOTO_1 echo \"Don't run this\" GOTO_1 echo \"Also run this\"<\/code><\/pre>\n<p>\u0421\u043b\u043e\u0436\u0438\u0432 \u0432\u0441\u0435 \u0437\u043d\u0430\u043d\u0438\u044f, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code>:&lt;&lt;\"::CMDLITERAL\" @ECHO OFF GOTO :CMDSCRIPT ::CMDLITERAL  source ~\/.bash_profile source $PYTHON_ENV\/bin\/activate python -c \"import platform; print(f\\\"{platform.system()}\\\")\" exit $?  :CMDSCRIPT call %PYTHON_ENV%\\Scripts\\activate.bat python -c \"import platform; print(f\\\"{platform.system()}\\\")\"<\/code><\/pre>\n<p>\u041a\u0440\u0430\u0441\u0438\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u043b\u0430\u043d Bamboo \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0430\u0433\u0435\u043d\u0442\u0435 (Linux \u0438\u043b\u0438 Windows) \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u043c Python.<\/p>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0447\u0442\u043e \u044f \u043d\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u043b \u2013 \u0447\u0442\u043e \u0437\u0430 \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b $? \u0438\u0434\u0443\u0449\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b exit.<\/p>\n<p>\u0412 Bash \u0441\u0438\u043c\u0432\u043e\u043b\u044b $? \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0442\u043e\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 \u0441 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435\u043c \u00ab:\u00bb, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u00ab:\u00bb \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f $? \u0432 0 (false).<\/p>\n<p>\u0412 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0438 \u043d\u0430 stackoverflow \u0431\u044b\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u044b \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043d\u043e \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u0435\u0435 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u0434 Bash \u0438 Cmd.<\/p>\n<p>\u041d\u0435 \u0432\u0435\u0440\u044c\u0442\u0435, \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0427\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0443\u0441\u0438\u043b\u0438\u0439 &#8212; \u0438 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u043a\u0430\u043a \u0432 Linux, \u0442\u0430\u043a \u0438 \u0432 Windows.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/648647\/\"> https:\/\/habr.com\/ru\/post\/648647\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u00ab\u0411\u0438\u0442\u044c (Bash) \u0438\u043b\u0438 \u043d\u0435 \u0431\u0438\u0442\u044c\u00bb, &#8212; \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043b \u043e\u0434\u0438\u043d \u0414\u0430\u0442\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043d\u0446. \u0412\u043e\u0442 \u0438 \u0443 \u043c\u0435\u043d\u044f \u0432\u043e\u0437\u043d\u0438\u043a \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u0431\u043e\u0440\u043a\u0438 Bamboo. \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432 \u0437\u0430\u0434\u0430\u043d\u0438\u0438 Bamboo, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 Bash \u0438\u043b\u0438 Cmd, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 Windows \u0438 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 Linux?<\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043f\u043b\u0430\u043d\u043e\u0432 Bamboo \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 \u044f\u0437\u044b\u043a Python. \u041d\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 Windows \u0438 Linux \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0439 \u043a\u043e\u0434, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f:<\/p>\n<p>Windows:<\/p>\n<pre><code>call %PYTHON_ENV%\\Scripts\\activate.bat python \u0438\u043c\u044f_\u0441\u043a\u0440\u0438\u043f\u0442\u0430.py %bamboo_issue_key%<\/code><\/pre>\n<p>Linux:<\/p>\n<pre><code class=\"bash\">source ~\/.bash_profile source $PYTHON_ENV\/bin\/activate python \u0438\u043c\u044f_\u0441\u043a\u0440\u0438\u043f\u0442\u0430.py $bamboo_issue_key<\/code><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 Linux \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u0432 Windows \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442. \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438? \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 &#8212; \u043e\u0442\u0432\u0435\u0440\u0433\u0430\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0430\u0433\u0435\u043d\u0442\u043e\u0432? \u042f \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u043b \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 Bash \u0438 Windows command; \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u043e\u0442\u0432\u0435\u0442 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435; \u0437\u0430\u0434\u0430\u0432\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u044c\u043d\u044b\u0445 \u0441\u0430\u0439\u0442\u0430\u0445. \u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u043d\u0430 stackoverflow \u044f \u043d\u0430\u0448\u0435\u043b \u0438\u0437\u044f\u0449\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0412 Windows Cmd, \u0441\u0442\u0440\u043e\u043a\u0430, \u043d\u0430\u0447\u0430\u0442\u0430\u044f \u0441 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u00ab:\u00bb, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u043e \u043c\u0435\u0442\u043a\u0438. \u0415\u0441\u043b\u0438 \u0438\u043c\u044f \u043c\u0435\u0442\u043a\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043b\u0438 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0430 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f! \u0410 \u0447\u0442\u043e \u0432 Linux? \u0421\u0438\u043c\u0432\u043e\u043b \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 \u00ab:\u00bb, \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u0435\u043d true \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 POSIX-\u043e\u0431\u043e\u043b\u043e\u0447\u0435\u043a. \u0418\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u0432 Bash \u043d\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 true \u0438 false. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e true \u0431\u044b\u043b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u043e\u043c \u00ab:\u00bb, \u0430 false \u2014 \u0447\u0435\u043c-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 let 0.<\/p>\n<p>\u0412 Linux \u043d\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b goto. \u041d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 heredocs, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u043f\u0443\u0441\u043a \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"bash\">echo \"Run this\" cat >\/dev\/null &lt;&lt;GOTO_1 echo \"Don't run this\" GOTO_1 echo \"Also run this\"<\/code><\/pre>\n<p>\u0421\u043b\u043e\u0436\u0438\u0432 \u0432\u0441\u0435 \u0437\u043d\u0430\u043d\u0438\u044f, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code>:&lt;&lt;\"::CMDLITERAL\" @ECHO OFF GOTO :CMDSCRIPT ::CMDLITERAL  source ~\/.bash_profile source $PYTHON_ENV\/bin\/activate python -c \"import platform; print(f\\\"{platform.system()}\\\")\" exit $?  :CMDSCRIPT call %PYTHON_ENV%\\Scripts\\activate.bat python -c \"import platform; print(f\\\"{platform.system()}\\\")\"<\/code><\/pre>\n<p>\u041a\u0440\u0430\u0441\u0438\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u043b\u0430\u043d Bamboo \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0430\u0433\u0435\u043d\u0442\u0435 (Linux \u0438\u043b\u0438 Windows) \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u043c Python.<\/p>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0447\u0442\u043e \u044f \u043d\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u043b \u2013 \u0447\u0442\u043e \u0437\u0430 \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b $? \u0438\u0434\u0443\u0449\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b exit.<\/p>\n<p>\u0412 Bash \u0441\u0438\u043c\u0432\u043e\u043b\u044b $? \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0442\u043e\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 \u0441 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435\u043c \u00ab:\u00bb, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u00ab:\u00bb \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f $? \u0432 0 (false).<\/p>\n<p>\u0412 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0438 \u043d\u0430 stackoverflow \u0431\u044b\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u044b \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043d\u043e \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u0435\u0435 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u0434 Bash \u0438 Cmd.<\/p>\n<p>\u041d\u0435 \u0432\u0435\u0440\u044c\u0442\u0435, \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0427\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0443\u0441\u0438\u043b\u0438\u0439 &#8212; \u0438 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u043a\u0430\u043a \u0432 Linux, \u0442\u0430\u043a \u0438 \u0432 Windows.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/648647\/\"> https:\/\/habr.com\/ru\/post\/648647\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-328830","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328830","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=328830"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328830\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=328830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=328830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=328830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}