{"id":270939,"date":"2015-12-23T10:08:02","date_gmt":"2015-12-23T07:08:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=270939"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=270939","title":{"rendered":"\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u044e Unix \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/443\/557\/e94\/443557e9461a4bf092e5d491cfbf7c3e.jpg\"\/><\/p>\n<p>  \u0425\u0432\u0430\u0442\u0438\u0442 \u201c#\u201d \u0438 \u201c$\u201d? \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/Bash\">bash<\/a> \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0446\u0432\u0435\u0442 \u0448\u0440\u0438\u0444\u0442\u0430 \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0412\u0430\u0448\u0443 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e \u0433\u0434\u0435 \u0412\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0432 \u043a\u0430\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0412\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>  \u0421\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u043e\u0433\u0430\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u043c\u0435\u043a, \u0447\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0435\u0441\u043b\u0438 \u0412\u044b \u0447\u0430\u0441\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435 \u0441\u0435\u0431\u044f \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 3-4 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044f \u043f\u043e \u043e\u043a\u043d\u0430\u043c, \u0447\u0442\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0435\u0449\u0438\u0435, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e\u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u043b\u0438 \u0435\u0441\u043b\u0438 \u0412\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u0440\u0430\u0437\u043d\u044b\u0445 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432. \u041d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c, \u0435\u0441\u043b\u0438 \u0412\u0430\u043c \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u0412\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435.<a name=\"habracut\"><\/a><\/p>\n<p>  \u0412\u0441\u0435 \u0447\u0442\u043e \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 PS1 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0445 \u0443 \u0412\u0430\u0448\u0435\u0439   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">.bashrc<\/b><\/p>\n<div class=\"spoiler_text\">\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 G. \u041f\u0440\u0438\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430 .bashrc<\/p>\n<p>  \u0424\u0430\u0439\u043b ~\/.bashrc \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438. \u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0438 Bash.<\/p>\n<p>  Emmanuel Rouat \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439, \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0439, \u0444\u0430\u0439\u043b .bashrc, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Linux. \u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f.<\/p>\n<p>  \u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b. \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0443\u0447\u0430\u0441\u0442\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432\u044b \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u0435\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c .bashrc \u0438\u043b\u0438, \u0434\u0430\u0436\u0435 \u0432 \u0441\u0432\u043e\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445!<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 G-1. \u041f\u0440\u0438\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430 .bashrc<\/p>\n<p>  #===============================================================<br \/>  #<br \/>  # \u041b\u0418\u0427\u041d\u042b\u0419 \u0424\u0410\u0419\u041b $HOME\/.bashrc \u0434\u043b\u044f bash-2.05a (\u0438\u043b\u0438 \u0432\u044b\u0448\u0435)<br \/>  #<br \/>  # \u0412\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438: \u0412\u0442\u0440 \u0410\u043f\u0440 15 20:32:34 CEST 2003<br \/>  #<br \/>  # \u042d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438.<br \/>  # \u0417\u0434\u0435\u0441\u044c \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u043e\u0432, \u0444\u0443\u043d\u043a\u0446\u0438\u0439<br \/>  # \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 Bash, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a prompt (\u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 \u043a \u0432\u0432\u043e\u0434\u0443).<br \/>  #<br \/>  # \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e, \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0432 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 Solaris,<br \/>  # \u043d\u043e \u043f\u043e\u0437\u0434\u043d\u0435\u0435 \u0431\u044b\u043b \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u043d \u043f\u043e\u0434 Redhat<br \/>  # &#8212;&gt; \u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e\u0434 Linux.<br \/>  # \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0434\u0435\u0441\u044c, \u0431\u044b\u043b\u0430 \u0432\u0437\u044f\u0442\u0430 \u0438\u0437<br \/>  # Usenet (\u0438\u043b\u0438 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442).<br \/>  # \u042d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u2014 \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043f\u0440\u0438\u043c\u0435\u0440.<br \/>  #<br \/>  #<br \/>  #===============================================================<\/p>\n<p>  # &#8212;&gt; \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u0440\u043e\u043c HOWTO.<br \/>  # &#8212;&gt; \u0418 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f Emmanuel Rouat \ud83d\ude42<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>  # \u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>  if [ -f \/etc\/bashrc ]; then<br \/>  . \/etc\/bashrc # &#8212;&gt; \u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0437 \/etc\/bashrc, \u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0432\u043e\u0439 \u0438\u043c\u0435\u0435\u0442\u0441\u044f.<br \/>  fi<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 $DISPLAY (\u0435\u0441\u043b\u0438 \u0435\u0449\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430)<br \/>  # \u042d\u0442\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0434 linux \u2014 \u0432 \u0432\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443\u2026<br \/>  # \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u0432<br \/>  # \u0434\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 &#8216;who am i&#8217;\u2026<br \/>  # \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b &#8216;\u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e&#8217; \u043c\u0435\u0442\u043e\u0434\u0430<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>  function get_xserver ()<br \/>  {<br \/>   case $TERM in<br \/>   xterm )<br \/>   XSERVER=$(who am i | awk &#8216;{print $NF}&#8217; | tr -d &#8216;)&#187;(&#8216; )<br \/>   XSERVER=${XSERVER%%:*}<br \/>   ;;<br \/>   aterm | rxvt)<br \/>   # \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0437\u0434\u0435\u0441\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0434\u2026<br \/>   ;;<br \/>   esac<br \/>  }<\/p>\n<p>  if [ -z ${DISPLAY:=&quot;&quot;} ]; then<br \/>   get_xserver<br \/>   if [[ -z ${XSERVER} || ${XSERVER} == $(hostname) || ${XSERVER} == \u00abunix\u00bb ]]; then<br \/>   DISPLAY=&quot;:0.0&quot; # \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430<br \/>   else<br \/>   DISPLAY=${XSERVER}:0.0 # \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430<br \/>   fi<br \/>  fi<\/p>\n<p>  export DISPLAY<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>  # \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>  ulimit -S -c 0 # \u0417\u0430\u043f\u0440\u0435\u0442 \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 coredump<br \/>  set -o notify<br \/>  set -o noclobber<br \/>  set -o ignoreeof<br \/>  set -o nounset<br \/>  #set -o xtrace # \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438<\/p>\n<p>  # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<br \/>  shopt -s cdspell<br \/>  shopt -s cdable_vars<br \/>  shopt -s checkhash<br \/>  shopt -s checkwinsize<br \/>  shopt -s mailwarn<br \/>  shopt -s sourcepath<br \/>  shopt -s no_empty_cmd_completion # \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f bash&gt;=2.04<br \/>  shopt -s cmdhist<br \/>  shopt -s histappend histreedit histverify<br \/>  shopt -s extglob<\/p>\n<p>  # \u0417\u0430\u043f\u0440\u0435\u0449\u0430\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<br \/>  shopt -u mailwarn<br \/>  unset MAILCHECK # \u042f \u043d\u0435 \u0436\u0435\u043b\u0430\u044e, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0430\u044f \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0430\u043b\u0430 \u043c\u043d\u0435 \u043e \u043f\u0440\u0438\u0431\u044b\u0442\u0438\u0438 \u043f\u043e\u0447\u0442\u044b<\/p>\n<p>  export TIMEFORMAT=$&#8217;\\nreal %3R\\tuser %3U\\tsys %3S\\tpcpu %P\\n&#8217;<br \/>  export HISTIGNORE=&quot;&#038;:bg:fg:ll:h&quot;<br \/>  export HOSTFILE=$HOME\/.hosts # \u041f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 \u0432 \u0444\u0430\u0439\u043b ~\/.hosts<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>  # Greeting, motd etc\u2026<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>  # \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0446\u0432\u0435\u0442\u0430:<br \/>  red=&#8217;\\e[0;31m&#8217;<br \/>  RED=&#8217;\\e[1;31m&#8217;<br \/>  blue=&#8217;\\e[0;34m&#8217;<br \/>  BLUE=&#8217;\\e[1;34m&#8217;<br \/>  cyan=&#8217;\\e[0;36m&#8217;<br \/>  CYAN=&#8217;\\e[1;36m&#8217;<br \/>  NC=&#8217;\\e[0m&#8217; # No Color (\u043d\u0435\u0442 \u0446\u0432\u0435\u0442\u0430)<br \/>  # &#8212;&gt; \u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e. \u0418\u043c\u0435\u0435\u0442 \u0442\u043e\u0442 \u0436\u0435 \u044d\u0444\u0444\u0435\u043a\u0442, \u0447\u0442\u043e \u0438 \u00abansi.sys\u00bb \u0432 DOS.<\/p>\n<p>  # \u041b\u0443\u0447\u0448\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430 \u0447\u0435\u0440\u043d\u043e\u043c \u0444\u043e\u043d\u0435\u2026<br \/>  echo -e &quot;${CYAN}This is BASH ${RED}${BASH_VERSION%.*}${CYAN} \u2014 DISPLAY on ${RED}$DISPLAY${NC}\\n&quot;<br \/>  date<br \/>  if [ -x \/usr\/games\/fortune ]; then<br \/>   \/usr\/games\/fortune -s # \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u0430\u0448 \u0434\u0435\u043d\u044c \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u2026 \ud83d\ude42<br \/>  fi<\/p>\n<p>  function _exit() # \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0449\u0430\u044f\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438<br \/>  {<br \/>   echo -e &quot;${RED}\u0410\u0441\u0442\u0430 \u043b\u0430 \u0432\u0438\u0441\u0442\u0430, \u0431\u044d\u0431\u0438 ${NC}&quot;<br \/>  }<br \/>  trap _exit EXIT<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>  # Prompt<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>  if [[ &quot;${DISPLAY#$HOST}&quot; != &quot;:0.0&quot; &#038;&#038; &quot;${DISPLAY}&quot; != &quot;:0&quot; ]]; then<br \/>   HILIT=${red} # \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435: prompt \u0431\u0443\u0434\u0435\u0442 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043a\u0440\u0430\u0441\u043d\u044b\u043c<br \/>  else<br \/>   HILIT=${cyan} # \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435: prompt \u0431\u0443\u0434\u0435\u0442 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0446\u0438\u0430\u043d\u043e\u0432\u044b\u043c<br \/>  fi<\/p>\n<p>  # &#8212;&gt; \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \\W \u043d\u0430 \\w \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u043d\u0438\u0436\u0435<br \/>  #+ &#8212;&gt; \u0447\u0442\u043e\u0431\u044b \u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0435 \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443.<\/p>\n<p>  function fastprompt()<br \/>  {<br \/>   unset PROMPT_COMMAND<br \/>   case $TERM in<br \/>   *term | rxvt )<br \/>   PS1=&quot;${HILIT}[\\h]$NC \\W &gt; \\[\\033]0;\\${TERM} [\\u@\\h] \\w\\007\\]&quot; ;;<br \/>   linux )<br \/>   PS1=&quot;${HILIT}[\\h]$NC \\W &gt; &quot; ;;<br \/>   *)<br \/>   PS1=&quot;[\\h] \\W &gt; &quot; ;;<br \/>   esac<br \/>  }<\/p>\n<p>  function powerprompt()<br \/>  {<br \/>   _powerprompt()<br \/>   {<br \/>   LOAD=$(uptime|sed -e \u00abs\/.*: \\([^,]*\\).*\/\\1\/\u00bb -e \u00abs\/ \/\/g\u00bb)<br \/>   }<\/p>\n<p>  PROMPT_COMMAND=_powerprompt<br \/>   case $TERM in<br \/>   *term | rxvt )<br \/>   PS1=&quot;${HILIT}[\\A \\$LOAD]$NC\\n[\\h \\#] \\W &gt; \\[\\033]0;\\${TERM} [\\u@\\h] \\w\\007\\]&quot; ;;<br \/>   linux )<br \/>   PS1=&quot;${HILIT}[\\A \u2014 \\$LOAD]$NC\\n[\\h \\#] \\w &gt; &quot; ;;<br \/>   * )<br \/>   PS1=&quot;[\\A \u2014 \\$LOAD]\\n[\\h \\#] \\w &gt; &quot; ;;<br \/>   esac<br \/>  }<\/p>\n<p>  powerprompt # \u044d\u0442\u043e prompt \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2014 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e<br \/>   # \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0442\u0430\u043a, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 fastprompt\u2026<\/p>\n<p>  #===============================================================<br \/>  #<br \/>  # \u041f\u0421\u0415\u0412\u0414\u041e\u041d\u0418\u041c\u042b \u0418 \u0424\u0423\u041d\u041a\u0426\u0418\u0418<br \/>  #<br \/>  # \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0437\u0434\u0435\u0441\u044c, \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u0430\u0441 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438,<br \/>  # \u043d\u043e \u043d\u0430 \u043c\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e 512Mb \u041e\u0417\u0423, \u0442\u0430\u043a \u0447\u0442\u043e\u2026<br \/>  # \u0415\u0441\u043b\u0438 \u043f\u043e\u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u044d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<br \/>  # \u0432 \u0432\u0438\u0434\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432.<br \/>  #<br \/>  # \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0431\u044b\u043b\u0438 \u0432\u0437\u044f\u0442\u044b, \u043f\u043e\u0447\u0442\u0438 \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u043a\u0438, \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432<br \/>  # \u043a bash-2.04.<br \/>  #<br \/>  #===============================================================<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # \u041f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u044b<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>  alias rm=&#8217;rm -i&#8217;<br \/>  alias cp=&#8217;cp -i&#8217;<br \/>  alias mv=&#8217;mv -i&#8217;<br \/>  # -&gt; \u041f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432.<br \/>  alias mkdir=&#8217;mkdir -p&#8217;<\/p>\n<p>  alias h=&#8217;history&#8217;<br \/>  alias j=&#8217;jobs -l&#8217;<br \/>  alias r=&#8217;rlogin&#8217;<br \/>  alias which=&#8217;type -all&#8217;<br \/>  alias ..=&#8217;cd ..&#8217;<br \/>  alias path=&#8217;echo -e ${PATH\/\/:\/\\\\n}&#8217;<br \/>  alias print=&#8217;\/usr\/bin\/lp -o nobanner -d $LPDEST&#8217; # \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e LPDEST \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d<br \/>  alias pjet=&#8217;enscript -h -G -fCourier9 -d $LPDEST&#8217; # \u041f\u0435\u0447\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 enscript<br \/>  alias background=&#8217;xv -root -quit -max -rmode 5&#8242; # \u041f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u043e\u043d\u0430<br \/>  alias du=&#8217;du -kh&#8217;<br \/>  alias df=&#8217;df -kTh&#8217;<\/p>\n<p>  # \u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b &#8216;ls&#8217; (\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 GNU-\u0432\u0435\u0440\u0441\u0438\u044f ls)<br \/>  alias la=&#8217;ls -Al&#8217; # \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u0444\u0430\u0439\u043b\u044b<br \/>  alias ls=&#8217;ls -hF &#8212;color&#8217; # \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0446\u0432\u0435\u0442\u043e\u043c<br \/>  alias lx=&#8217;ls -lXB&#8217; # \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044e<br \/>  alias lk=&#8217;ls -lSr&#8217; # \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443<br \/>  alias lc=&#8217;ls -lcr&#8217; # \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f<br \/>  alias lu=&#8217;ls -lur&#8217; # \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f<br \/>  alias lr=&#8217;ls -lR&#8217; # \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0439 \u043e\u0431\u0445\u043e\u0434 \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432<br \/>  alias lt=&#8217;ls -ltr&#8217; # \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e \u0434\u0430\u0442\u0435<br \/>  alias lm=&#8217;ls -al |more&#8217; # \u0432\u044b\u0432\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 &#8216;more&#8217;<br \/>  alias tree=&#8217;tree -Csu&#8217; # \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 &#8216;ls&#8217;<\/p>\n<p>  # \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 &#8216;less&#8217;<br \/>  alias more=&#8217;less&#8217;<br \/>  export PAGER=less<br \/>  export LESSCHARSET=&#8217;latin1&#8242;<br \/>  export LESSOPEN=&#8217;|\/usr\/bin\/lesspipe.sh %s 2&gt;&#038;-&#8216; # \u0435\u0441\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 lesspipe.sh<br \/>  export LESS=&#8217;-i -N -w -z-4 -g -e -M -X -F -R -P%t?f%f \\<br \/>  :stdin .?pb%pb\\%:?lbLine %lb:?bbByte %bb:-&#8230;&#8217;<\/p>\n<p>  # \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0430\u0432\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u2014 \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \ud83d\ude42<br \/>  alias xs=&#8217;cd&#8217;<br \/>  alias vf=&#8217;cd&#8217;<br \/>  alias moer=&#8217;more&#8217;<br \/>  alias moew=&#8217;more&#8217;<br \/>  alias kk=&#8217;ll&#8217;<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0435\u043c\u043d\u043e\u0436\u043a\u043e \u00ab\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439\u00bb<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>  function xtitle ()<br \/>  {<br \/>   case &quot;$TERM&quot; in<br \/>   *term | rxvt)<br \/>   echo -n -e &quot;\\033]0;$*\\007&quot; ;;<br \/>   *)<br \/>   ;;<br \/>   esac<br \/>  }<\/p>\n<p>  # \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u044b\u2026<br \/>  alias top=&#8217;xtitle Processes on $HOST &#038;&#038; top&#8217;<br \/>  alias make=&#8217;xtitle Making $(basename $PWD); make&#8217;<br \/>  alias ncftp=\u00abxtitle ncFTP; ncftp\u00bb<\/p>\n<p>  #\u2026 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<br \/>  function man ()<br \/>  {<br \/>   for i; do<br \/>   xtitle The $(basename $1|tr -d .[:digit:]) manual<br \/>   command man -F -a &quot;$i&quot;<br \/>   done<br \/>  }<\/p>\n<p>  function ll(){ ls -l &quot;$@&quot;| egrep &quot;^d&quot;; ls -lXB &quot;$@&quot; 2&gt;&#038;-| egrep -v &quot;^d|total &quot;; }<br \/>  function te() # \u00ab\u043e\u0431\u0435\u0440\u0442\u043a\u0430\u00bb \u0432\u043e\u043a\u0440\u0443\u0433 xemacs\/gnuserv<br \/>  {<br \/>   if [ &quot;$(gnuclient -batch -eval t 2&gt;&#038;-)&quot; == \u00abt\u00bb ]; then<br \/>   gnuclient -q &quot;$@&quot;;<br \/>   else<br \/>   ( xemacs &quot;$@&quot; &#038;);<br \/>   fi<br \/>  }<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>  # \u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438:<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>  # \u041f\u043e\u0438\u0441\u043a \u0444\u0430\u0439\u043b\u0430 \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443:<br \/>  function ff() { find. -type f -iname &#8216;*&#8217;$*&#8217;*&#8217; -ls; }<br \/>  # \u041f\u043e\u0438\u0441\u043a \u0444\u0430\u0439\u043b\u0430 \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443 \u0432 $1 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 $2 \u0441 \u043d\u0438\u043c:<br \/>  function fe() { find. -type f -iname &#8216;*&#8217;$1&#8217;*&#8217; -exec &quot;${2:-file}&quot; {} \\;; }<br \/>  # \u043f\u043e\u0438\u0441\u043a \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c:<br \/>  function fstr()<br \/>  {<br \/>   OPTIND=1<br \/>   local case=&quot;&quot;<br \/>   local usage=\u00abfstr: \u043f\u043e\u0438\u0441\u043a \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445.<br \/>  \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f: fstr [-i] \\\u00bb\u0448\u0430\u0431\u043b\u043e\u043d\\&quot; [\\\u00ab\u0448\u0430\u0431\u043b\u043e\u043d_\u0438\u043c\u0435\u043d\u0438_\u0444\u0430\u0439\u043b\u0430\\\u00bb] &quot;<br \/>   while getopts :it opt<br \/>   do<br \/>   case &quot;$opt&quot; in<br \/>   i) case=&quot;-i &quot; ;;<br \/>   *) echo &quot;$usage&quot;; return;;<br \/>   esac<br \/>   done<br \/>   shift $(( $OPTIND \u2014 1 ))<br \/>   if [ &quot;$#&quot; -lt 1 ]; then<br \/>   echo &quot;$usage&quot;<br \/>   return;<br \/>   fi<br \/>   local SMSO=$(tput smso)<br \/>   local RMSO=$(tput rmso)<br \/>   find. -type f -name &quot;${2:-*}&quot; -print0 | xargs -0 grep -sn ${case} &quot;$1&quot; 2&gt;&#038;- | \\<br \/>  sed \u00abs\/$1\/${SMSO}\\0${RMSO}\/gI\u00bb | more<br \/>  }<\/p>\n<p>  function cuttail() # \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 n \u0441\u0442\u0440\u043e\u043a \u0432 \u0444\u0430\u0439\u043b\u0435, \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 10<br \/>  {<br \/>   nlines=${2:-10}<br \/>   sed -n -e :a -e \u00ab1,${nlines}!{P;N;D;};N;ba\u00bb $1<br \/>  }<\/p>\n<p>  function lowercase() # \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0432 \u043d\u0438\u0436\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440<br \/>  {<br \/>   for file; do<br \/>   filename=${file##*\/}<br \/>   case &quot;$filename&quot; in<br \/>   *\/*) dirname==${file%\/*} ;;<br \/>   *) dirname=.;;<br \/>   esac<br \/>   nf=$(echo $filename | tr A-Z a-z)<br \/>   newname=&quot;${dirname}\/${nf}&quot;<br \/>   if [ &quot;$nf&quot; != &quot;$filename&quot; ]; then<br \/>   mv &quot;$file&quot; &quot;$newname&quot;<br \/>   echo \u00ablowercase: $file &#8212;&gt; $newname\u00bb<br \/>   else<br \/>   echo \u00ablowercase: \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 $file \u043d\u0435 \u0431\u044b\u043b\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043e.\u00bb<br \/>   fi<br \/>   done<br \/>  }<\/p>\n<p>  function swap() # \u043c\u0435\u043d\u044f\u0435\u0442 2 \u0444\u0430\u0439\u043b\u0430 \u043c\u0435\u0441\u0442\u0430\u043c\u0438<br \/>  {<br \/>   local TMPFILE=tmp.$$<br \/>   mv &quot;$1&quot; $TMPFILE<br \/>   mv &quot;$2&quot; &quot;$1&quot;<br \/>   mv $TMPFILE &quot;$2&quot;<br \/>  }<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>  # \u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438\/\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439:<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>  function my_ps() { ps $@ -u $USER -o pid,%cpu,%mem,bsdtime,command; }<br \/>  function pp() { my_ps f | awk &#8216;!\/awk\/ &#038;&#038; $0~var&#8217; var=${1:-&quot;.*&quot;}; }<\/p>\n<p>  # \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u0440\u0443\u0431\u044b\u043c \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u043c &#8216;killall&#8217; \u0432 linux<br \/>  # \u043d\u043e \u043d\u0435 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u0430 (\u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u0437\u043d\u0430\u044e) &#8216;killall&#8217; \u0432 Solaris<br \/>  function killps() # \u00ab\u041f\u0440\u0438\u0431\u0438\u0442\u044c\u00bb \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e \u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0438<br \/>  {<br \/>   local pid pname sig=&quot;-TERM&quot; # \u0441\u0438\u0433\u043d\u0430\u043b, \u0440\u0430\u0441\u0441\u044b\u043b\u0430\u0435\u043c\u044b\u0439 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<br \/>   if [ &quot;$#&quot; -lt 1 ] || [ &quot;$#&quot; -gt 2 ]; then<br \/>   echo \u00ab\u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f: killps [-SIGNAL] \u0448\u0430\u0431\u043b\u043e\u043d_\u0438\u043c\u0435\u043d\u0438_\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u00bb<br \/>   return;<br \/>   fi<br \/>   if [ $# = 2 ]; then sig=$1; fi<br \/>   for pid in $(my_ps| awk &#8216;!\/awk\/ &#038;&#038; $0~pat { print $1 }&#8217; pat=${!#} ); do<br \/>   pname=$(my_ps | awk &#8216;$1~var { print $5 }&#8217; var=$pid )<br \/>   if ask \u00ab\u041f\u043e\u0441\u043b\u0430\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b $sig \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 $pid &lt;$pname&gt;?\u00bb<br \/>   then kill $sig $pid<br \/>   fi<br \/>   done<br \/>  }<\/p>\n<p>  function my_ip() # IP \u0430\u0434\u0440\u0435\u0441<br \/>  {<br \/>   MY_IP=$(\/sbin\/ifconfig ppp0 | awk &#8216;\/inet\/ { print $2 } &#8216; | sed -e s\/addr:\/\/)<br \/>   MY_ISP=$(\/sbin\/ifconfig ppp0 | awk &#8216;\/P-t-P\/ { print $3 } &#8216; | sed -e s\/P-t-P:\/\/)<br \/>  }<\/p>\n<p>  function ii() # \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0435<br \/>  {<br \/>   echo -e &quot;\\n\u0412\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u043d\u0430 ${RED}$HOST&quot;<br \/>   echo -e &quot;\\n\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f:$NC &quot;; uname -a<br \/>   echo -e &quot;\\n${RED}\u0412 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438:$NC &quot;; w -h<br \/>   echo -e &quot;\\n${RED}\u0414\u0430\u0442\u0430:$NC &quot;; date<br \/>   echo -e &quot;\\n${RED}\u0412\u0440\u0435\u043c\u044f, \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0435 \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 :$NC &quot;; uptime<br \/>   echo -e &quot;\\n${RED}\u041f\u0430\u043c\u044f\u0442\u044c :$NC &quot;; free<br \/>   my_ip 2&gt;&#038;-;<br \/>   echo -e &quot;\\n${RED}IP \u0430\u0434\u0440\u0435\u0441:$NC&quot;; echo ${MY_IP:-\u00ab\u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e\u00bb}<br \/>   echo -e &quot;\\n${RED}\u0410\u0434\u0440\u0435\u0441 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 (ISP):$NC&quot;; echo ${MY_ISP:-\u00ab\u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e\u00bb}<br \/>   echo<br \/>  }<\/p>\n<p>  # \u0420\u0430\u0437\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b:<\/p>\n<p>  function repeat() # \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 n \u0440\u0430\u0437<br \/>  {<br \/>   local i max<br \/>   max=$1; shift;<br \/>   for ((i=1; i &lt;= max; i++)); do # &#8212;&gt; C-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441<br \/>   eval &quot;$@&quot;;<br \/>   done<br \/>  }<\/p>\n<p>  function ask()<br \/>  {<br \/>   echo -n &quot;$@&quot; &#8216;[y\/n] &#8216;; read ans<br \/>   case &quot;$ans&quot; in<br \/>   y*|Y*) return 0 ;;<br \/>   *) return 1 ;;<br \/>   esac<br \/>  }<\/p>\n<p>  #=========================================================================<br \/>  #<br \/>  # \u041f\u0420\u041e\u0413\u0420\u0410\u041c\u041c\u041d\u042b\u0415 \u0414\u041e\u041f\u041e\u041b\u041d\u0415\u041d\u0418\u042f \u2014 \u0422\u041e\u041b\u042c\u041a\u041e \u041d\u0410\u0427\u0418\u041d\u0410\u042f \u0421 \u0412\u0415\u0420\u0421\u0418\u0418 BASH-2.04<br \/>  # \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0439 \u0432\u0437\u044f\u0442\u0430 \u0438\u0437 \u0434\u043e\u043a\u0443\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a bash 2.05 \u0438 \u0438\u0437<br \/>  # \u043f\u0430\u043a\u0435\u0442\u0430 &#8216;Bash completion&#8217; (http:\/\/www.caliban.org\/bash\/index.shtml#completion)<br \/>  # \u0430\u0432\u0442\u043e\u0440 \u2014 Ian McDonalds<br \/>  # \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0443 \u0432\u0430\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0442\u043e\u044f\u0442\u044c bash-2.05a<br \/>  #<br \/>  #=========================================================================<\/p>\n<p>  if [ &quot;${BASH_VERSION%.*}&quot; \\&lt; \u00ab2.05\u00bb ]; then<br \/>   echo \u00ab\u0412\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 2.05\u00bb<br \/>   return<br \/>  fi<\/p>\n<p>  shopt -s extglob # \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e<br \/>  set +o nounset # \u0438\u043d\u0430\u0447\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c<\/p>\n<p>  complete -A hostname rsh rcp telnet rlogin r ftp ping disk<br \/>  complete -A export printenv<br \/>  complete -A variable export local readonly unset<br \/>  complete -A enabled builtin<br \/>  complete -A alias alias unalias<br \/>  complete -A function function<br \/>  complete -A user su mail finger<\/p>\n<p>  complete -A helptopic help<br \/>  complete -A shopt shopt<br \/>  complete -A stopped -P &#8216;%&#8217; bg<br \/>  complete -A job -P &#8216;%&#8217; fg jobs disown<\/p>\n<p>  complete -A directory mkdir rmdir<br \/>  complete -A directory -o default cd<\/p>\n<p>  # \u0410\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044f<br \/>  complete -f -o default -X &#8216;*.+(zip|ZIP)&#8217; zip<br \/>  complete -f -o default -X &#8216;!*.+(zip|ZIP)&#8217; unzip<br \/>  complete -f -o default -X &#8216;*.+(z|Z)&#8217; compress<br \/>  complete -f -o default -X &#8216;!*.+(z|Z)&#8217; uncompress<br \/>  complete -f -o default -X &#8216;*.+(gz|GZ)&#8217; gzip<br \/>  complete -f -o default -X &#8216;!*.+(gz|GZ)&#8217; gunzip<br \/>  complete -f -o default -X &#8216;*.+(bz2|BZ2)&#8217; bzip2<br \/>  complete -f -o default -X &#8216;!*.+(bz2|BZ2)&#8217; bunzip2<br \/>  # Postscript,pdf,dvi\u2026<br \/>  complete -f -o default -X &#8216;!*.ps&#8217; gs ghostview ps2pdf ps2ascii<br \/>  complete -f -o default -X &#8216;!*.dvi&#8217; dvips dvipdf xdvi dviselect dvitype<br \/>  complete -f -o default -X &#8216;!*.pdf&#8217; acroread pdf2ps<br \/>  complete -f -o default -X &#8216;!*.+(pdf|ps)&#8217; gv<br \/>  complete -f -o default -X &#8216;!*.texi*&#8217; makeinfo texi2dvi texi2html texi2pdf<br \/>  complete -f -o default -X &#8216;!*.tex&#8217; tex latex slitex<br \/>  complete -f -o default -X &#8216;!*.lyx&#8217; lyx<br \/>  complete -f -o default -X &#8216;!*.+(htm*|HTM*)&#8217; lynx html2ps<br \/>  # Multimedia<br \/>  complete -f -o default -X &#8216;!*.+(jp*g|gif|xpm|png|bmp)&#8217; xv gimp<br \/>  complete -f -o default -X &#8216;!*.+(mp3|MP3)&#8217; mpg123 mpg321<br \/>  complete -f -o default -X &#8216;!*.+(ogg|OGG)&#8217; ogg123<\/p>\n<p>  complete -f -o default -X &#8216;!*.pl&#8217; perl perl5<\/p>\n<p>  # \u042d\u0442\u0438 &#8216;\u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0435&#8217; \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f<br \/>  # \u0441, \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u043c\u0438, &#8216;\u0434\u043b\u0438\u043d\u043d\u044b\u043c\u0438 \u043a\u043b\u044e\u0447\u0430\u043c\u0438&#8217;, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: &#8216;ls &#8212;all&#8217; \u0432\u043c\u0435\u0441\u0442\u043e &#8216;ls -a&#8217;<\/p>\n<p>  _get_longopts ()<br \/>  {<br \/>   $1 &#8212;help | sed -e &#8216;\/&#8212;\/!d&#8217; -e &#8216;s\/.*&#8212;\\([^[:space:].,]*\\).*\/&#8212;\\1\/&#8217;| \\<br \/>  grep ^&quot;$2&quot; |sort -u;<br \/>  }<\/p>\n<p>  _longopts_func ()<br \/>  {<br \/>   case &quot;${2:-*}&quot; in<br \/>   -*) ;;<br \/>   *) return ;;<br \/>   esac<\/p>\n<p>  case &quot;$1&quot; in<br \/>   \\~*) eval cmd=&quot;$1&quot; ;;<br \/>   *) cmd=&quot;$1&quot; ;;<br \/>   esac<br \/>   COMPREPLY=( $(_get_longopts ${1} ${2} ) )<br \/>  }<br \/>  complete -o default -F _longopts_func configure bash<br \/>  complete -o default -F _longopts_func wget id info a2ps ls recode<\/p>\n<p>  _make_targets ()<br \/>  {<br \/>   local mdef makef gcmd cur prev i<\/p>\n<p>  COMPREPLY=()<br \/>   cur=${COMP_WORDS[COMP_CWORD]}<br \/>   prev=${COMP_WORDS[COMP_CWORD-1]}<\/p>\n<p>  # \u0415\u0441\u043b\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 prev \u044d\u0442\u043e -f, \u0442\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u043c\u0435\u043d \u0444\u0430\u0439\u043b\u043e\u0432.<br \/>   # \u0431\u0443\u0434\u0435\u043c \u0432\u0435\u043b\u0438\u043a\u043e\u0434\u0443\u0448\u043d\u044b \u0438 \u0432\u0435\u0440\u043d\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432<br \/>   # `makefile Makefile *.mk&#8217;<br \/>   case &quot;$prev&quot; in<br \/>   -*f) COMPREPLY=( $(compgen -f $cur ) ); return 0;;<br \/>   esac<\/p>\n<p>  # \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438, \u0442\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043b\u044e\u0447\u0438 posix<br \/>   case &quot;$cur&quot; in<br \/>   -) COMPREPLY=(-e -f -i -k -n -p -q -r -S -s -t); return 0;;<br \/>   esac<\/p>\n<p>  # \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c make `makefile&#8217; \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c `Makefile&#8217;<br \/>   if [ -f makefile ]; then<br \/>   mdef=makefile<br \/>   elif [ -f Makefile ]; then<br \/>   mdef=Makefile<br \/>   else<br \/>   mdef=*.mk<br \/>   fi<\/p>\n<p>  # \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u00ab\u0446\u0435\u043b\u0438\u00bb, \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0438\u043c\u044f makefile \u0431\u044b\u043b\u043e \u0437\u0430\u0434\u0430\u043d\u043e<br \/>   # \u043a\u043b\u044e\u0447\u043e\u043c -f<br \/>   for (( i=0; i &lt; ${#COMP_WORDS[@]}; i++ )); do<br \/>   if [[ ${COMP_WORDS[i]} == -*f ]]; then<br \/>   eval makef=${COMP_WORDS[i+1]}<br \/>   break<br \/>   fi<br \/>   done<\/p>\n<p>  [ -z &quot;$makef&quot; ] &#038;&#038; makef=$mdef<\/p>\n<p>  # \u0415\u0441\u043b\u0438 \u0437\u0430\u0434\u0430\u043d \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u043e\u0438\u0441\u043a\u0430, \u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c\u0441\u044f<br \/>   # \u044d\u0442\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c<br \/>   if [ -n &quot;$2&quot; ]; then gcmd=&#8217;grep &quot;^$2&quot;&#8217;; else gcmd=cat; fi<\/p>\n<p>  # \u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u0436\u0435\u043b\u0430\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c *.mk, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0431\u0440\u0430\u0442\u044c cat \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c<br \/>   # test -f $makef \u0441 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u0432\u043e\u0434\u0430<br \/>   COMPREPLY=( $(cat $makef 2&gt;\/dev\/null | awk &#8216;BEGIN {FS=&quot;:&quot;} \/^[^.# ][^=]*:\/ {print $1}&#8217; | tr -s &#8216; &#8216; &#8216;\\012&#8217; | sort -u | eval $gcmd ) )<br \/>  }<\/p>\n<p>  complete -F _make_targets -X &#8216;+($*|*.[cho])&#8217; make gmake pmake<\/p>\n<p>  # cvs(1) completion<br \/>  _cvs ()<br \/>  {<br \/>   local cur prev<br \/>   COMPREPLY=()<br \/>   cur=${COMP_WORDS[COMP_CWORD]}<br \/>   prev=${COMP_WORDS[COMP_CWORD-1]}<\/p>\n<p>  if [ $COMP_CWORD -eq 1 ] || [ &quot;${prev:0:1}&quot; = &quot;-&quot; ]; then<br \/>   COMPREPLY=( $( compgen -W &#8216;add admin checkout commit diff \\<br \/>   export history import log rdiff release remove rtag status \\<br \/>   tag update&#8217; $cur ))<br \/>   else<br \/>   COMPREPLY=( $( compgen -f $cur ))<br \/>   fi<br \/>   return 0<br \/>  }<br \/>  complete -F _cvs cvs<\/p>\n<p>  _killall ()<br \/>  {<br \/>   local cur prev<br \/>   COMPREPLY=()<br \/>   cur=${COMP_WORDS[COMP_CWORD]}<\/p>\n<p>  # \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432<br \/>   COMPREPLY=( $( \/usr\/bin\/ps -u $USER -o comm | \\<br \/>   sed -e &#8216;1,1d&#8217; -e &#8216;s#[]\\[]##g&#8217; -e &#8216;s#^.*\/##&#8217;| \\<br \/>   awk &#8216;{if ($0 ~ \/^&#8217;$cur&#8217;\/) print $0}&#8217; ))<\/p>\n<p>  return 0<br \/>  }<\/p>\n<p>  complete -F _killall killall killps<\/p>\n<p>  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u0435\u0442\u0430-\u043a\u043e\u043c\u0430\u043d\u0434<br \/>  # \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, mount \u0438 umount<br \/>  # \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e), \u043d\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430. \u0410\u0432\u0442\u043e\u0440 Ian McDonald, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0430 \u043c\u043d\u043e\u0439.<\/p>\n<p>  _my_command()<br \/>  {<br \/>   local cur func cline cspec<\/p>\n<p>  COMPREPLY=()<br \/>   cur=${COMP_WORDS[COMP_CWORD]}<\/p>\n<p>  if [ $COMP_CWORD = 1 ]; then<br \/>   COMPREPLY=( $( compgen -c $cur ) )<br \/>   elif complete -p ${COMP_WORDS[1]} &#038;&gt;\/dev\/null; then<br \/>   cspec=$( complete -p ${COMP_WORDS[1]} )<br \/>   if [ &quot;${cspec%%-F *}&quot; != &quot;${cspec}&quot; ]; then<br \/>   # complete -F &lt;function&gt;<br \/>   #<br \/>   # COMP_CWORD and COMP_WORDS() \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c,<br \/>   # \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0445 \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c,<br \/>   # \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u0445 \u0434\u0430\u043b\u044c\u0448\u0435<\/p>\n<p>  # \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043d\u0430 1 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043d\u043e\u043c\u0435\u0440 \u043b\u0435\u043a\u0441\u0435\u043c\u044b<br \/>   COMP_CWORD=$(( $COMP_CWORD \u2014 1 ))<br \/>   # \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043c\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438<br \/>   func=${cspec#*-F }<br \/>   func=${func%% *}<br \/>   # \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443<br \/>   cline=&quot;${COMP_LINE#$1 }&quot;<br \/>   # \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 \u043b\u0435\u043a\u0441\u0435\u043c\u044b \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043c\u0430\u0441\u0441\u0438\u0432<br \/>   COMP_WORDS=( $cline )<br \/>   $func $cline<br \/>   elif [ &quot;${cspec#*-[abcdefgjkvu]}&quot; != &quot;&quot; ]; then<br \/>   # complete -[abcdefgjkvu]<br \/>   #func=$( echo $cspec | sed -e &#8216;s\/^.*\\(-[abcdefgjkvu]\\).*$\/\\1\/&#8217; )<br \/>   func=$( echo $cspec | sed -e &#8216;s\/^complete\/\/&#8217; -e &#8216;s\/[^ ]*$\/\/&#8217; )<br \/>   COMPREPLY=( $( eval compgen $func $cur ) )<br \/>   elif [ &quot;${cspec#*-A}&quot; != &quot;$cspec&quot; ]; then<br \/>   # complete -A &lt;type&gt;<br \/>   func=${cspec#*-A }<br \/>   func=${func%% *}<br \/>   COMPREPLY=( $( compgen -A $func $cur ) )<br \/>   fi<br \/>   else<br \/>   COMPREPLY=( $( compgen -f $cur ) )<br \/>   fi<br \/>  }<\/p>\n<p>  complete -o default -F _my_command nohup exec eval trace truss strace sotruss gdb<br \/>  complete -o default -F _my_command command type which man nice<\/p>\n<p>  # \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435:<br \/>  # mode:shell-script<br \/>  # sh-shell:bash<br \/>  # \u041a\u043e\u043d\u0435\u0446:<\/div>\n<\/div>\n<p>\u0438\u043b\u0438   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">.bash_profile file<\/b><\/p>\n<div class=\"spoiler_text\">Appendix M. Sample .bashrc and .bash_profile Files<\/p>\n<p>  The ~\/.bashrc file determines the behavior of interactive shells. A good look at this file can lead to a better understanding of Bash.<\/p>\n<p>  Emmanuel Rouat contributed the following very elaborate .bashrc file, written for a Linux system. He welcomes reader feedback on it.<\/p>\n<p>  Study the file carefully, and feel free to reuse code snippets and functions from it in your own .bashrc file or even in your scripts.<\/p>\n<p>  Example M-1. Sample .bashrc file<\/p>\n<p>  # =============================================================== #<br \/>  #<br \/>  # PERSONAL $HOME\/.bashrc FILE for bash-3.0 (or later)<br \/>  # By Emmanuel Rouat [no-email]<br \/>  #<br \/>  # Last modified: Tue Nov 20 22:04:47 CET 2012<\/p>\n<p>  # This file is normally read by interactive shells only.<br \/>  #+ Here is the place to define your aliases, functions and<br \/>  #+ other interactive features like your prompt.<br \/>  #<br \/>  # The majority of the code here assumes you are on a GNU<br \/>  #+ system (most likely a Linux box) and is often based on code<br \/>  #+ found on Usenet or Internet.<br \/>  #<br \/>  # See for instance:<br \/>  # <a href=\"http:\/\/tldp.org\/LDP\/abs\/html\/index.html\">tldp.org\/LDP\/abs\/html\/index.html<\/a><br \/>  # <a href=\"http:\/\/www.caliban.org\/bash\">www.caliban.org\/bash<\/a><br \/>  # <a href=\"http:\/\/www.shelldorado.com\/scripts\/categories.html\">www.shelldorado.com\/scripts\/categories.html<\/a><br \/>  # <a href=\"http:\/\/www.dotfiles.org\">www.dotfiles.org<\/a><br \/>  #<br \/>  # The choice of colors was done for a shell with a dark background<br \/>  #+ (white on black), and this is usually also suited for pure text-mode<br \/>  #+ consoles (no X server available). If you use a white background,<br \/>  #+ you&#8217;ll have to do some other choices for readability.<br \/>  #<br \/>  # This bashrc file is a bit overcrowded.<br \/>  # Remember, it is just just an example.<br \/>  # Tailor it to your needs.<br \/>  #<br \/>  # =============================================================== #<\/p>\n<p>  # &#8212;&gt; Comments added by HOWTO author.<\/p>\n<p>  # If not running interactively, don&#8217;t do anything<br \/>  [ -z &quot;$PS1&quot; ] &#038;&#038; return<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # Source global definitions (if any)<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>  if [ -f \/etc\/bashrc ]; then<br \/>  . \/etc\/bashrc # &#8212;&gt; Read \/etc\/bashrc, if present.<br \/>  fi<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>  # Automatic setting of $DISPLAY (if not set already).<br \/>  # This works for me \u2014 your mileage may vary&#8230;.<br \/>  # The problem is that different types of terminals give<br \/>  #+ different answers to &#8216;who am i&#8217; (rxvt in particular can be<br \/>  #+ troublesome) \u2014 however this code seems to work in a majority<br \/>  #+ of cases.<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>  function get_xserver ()<br \/>  {<br \/>   case $TERM in<br \/>   xterm )<br \/>   XSERVER=$(who am i | awk &#8216;{print $NF}&#8217; | tr -d &#8216;)&#187;(&#8216; )<br \/>   # Ane-Pieter Wieringa suggests the following alternative:<br \/>   # I_AM=$(who am i)<br \/>   # SERVER=${I_AM#*(}<br \/>   # SERVER=${SERVER%*)}<br \/>   XSERVER=${XSERVER%%:*}<br \/>   ;;<br \/>   aterm | rxvt)<br \/>   # Find some code that works here.\u2026<br \/>   ;;<br \/>   esac<br \/>  }<\/p>\n<p>  if [ -z ${DISPLAY:=&quot;&quot;} ]; then<br \/>   get_xserver<br \/>   if [[ -z ${XSERVER} || ${XSERVER} == $(hostname) ||<br \/>   ${XSERVER} == \u00abunix\u00bb ]]; then<br \/>   DISPLAY=&quot;:0.0&quot; # Display on local host.<br \/>   else<br \/>   DISPLAY=${XSERVER}:0.0 # Display on remote host.<br \/>   fi<br \/>  fi<\/p>\n<p>  export DISPLAY<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # Some settings<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>  #set -o nounset # These two options are useful for debugging.<br \/>  #set -o xtrace<br \/>  alias debug=\u00abset -o nounset; set -o xtrace\u00bb<\/p>\n<p>  ulimit -S -c 0 # Don&#8217;t want coredumps.<br \/>  set -o notify<br \/>  set -o noclobber<br \/>  set -o ignoreeof<\/p>\n<p>  # Enable options:<br \/>  shopt -s cdspell<br \/>  shopt -s cdable_vars<br \/>  shopt -s checkhash<br \/>  shopt -s checkwinsize<br \/>  shopt -s sourcepath<br \/>  shopt -s no_empty_cmd_completion<br \/>  shopt -s cmdhist<br \/>  shopt -s histappend histreedit histverify<br \/>  shopt -s extglob # Necessary for programmable completion.<\/p>\n<p>  # Disable options:<br \/>  shopt -u mailwarn<br \/>  unset MAILCHECK # Don&#8217;t want my shell to warn me of incoming mail.<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # Greeting, motd etc.\u2026<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>  # Color definitions (taken from Color Bash Prompt HowTo).<br \/>  # Some colors might look different of some terminals.<br \/>  # For example, I see &#8216;Bold Red&#8217; as &#8216;orange&#8217; on my screen,<br \/>  # hence the &#8216;Green&#8217; &#8216;BRed&#8217; &#8216;Red&#8217; sequence I often use in my prompt.<\/p>\n<p>  # Normal Colors<br \/>  Black=&#8217;\\e[0;30m&#8217; # Black<br \/>  Red=&#8217;\\e[0;31m&#8217; # Red<br \/>  Green=&#8217;\\e[0;32m&#8217; # Green<br \/>  Yellow=&#8217;\\e[0;33m&#8217; # Yellow<br \/>  Blue=&#8217;\\e[0;34m&#8217; # Blue<br \/>  Purple=&#8217;\\e[0;35m&#8217; # Purple<br \/>  Cyan=&#8217;\\e[0;36m&#8217; # Cyan<br \/>  White=&#8217;\\e[0;37m&#8217; # White<\/p>\n<p>  # Bold<br \/>  BBlack=&#8217;\\e[1;30m&#8217; # Black<br \/>  BRed=&#8217;\\e[1;31m&#8217; # Red<br \/>  BGreen=&#8217;\\e[1;32m&#8217; # Green<br \/>  BYellow=&#8217;\\e[1;33m&#8217; # Yellow<br \/>  BBlue=&#8217;\\e[1;34m&#8217; # Blue<br \/>  BPurple=&#8217;\\e[1;35m&#8217; # Purple<br \/>  BCyan=&#8217;\\e[1;36m&#8217; # Cyan<br \/>  BWhite=&#8217;\\e[1;37m&#8217; # White<\/p>\n<p>  # Background<br \/>  On_Black=&#8217;\\e[40m&#8217; # Black<br \/>  On_Red=&#8217;\\e[41m&#8217; # Red<br \/>  On_Green=&#8217;\\e[42m&#8217; # Green<br \/>  On_Yellow=&#8217;\\e[43m&#8217; # Yellow<br \/>  On_Blue=&#8217;\\e[44m&#8217; # Blue<br \/>  On_Purple=&#8217;\\e[45m&#8217; # Purple<br \/>  On_Cyan=&#8217;\\e[46m&#8217; # Cyan<br \/>  On_White=&#8217;\\e[47m&#8217; # White<\/p>\n<p>  NC=&quot;\\e[m&quot; # Color Reset<\/p>\n<p>  ALERT=${BWhite}${On_Red} # Bold White on red background<\/p>\n<p>  echo -e &quot;${BCyan}This is BASH ${BRed}${BASH_VERSION%.*}${BCyan}\\<br \/>   \u2014 DISPLAY on ${BRed}$DISPLAY${NC}\\n&quot;<br \/>  date<br \/>  if [ -x \/usr\/games\/fortune ]; then<br \/>   \/usr\/games\/fortune -s # Makes our day a bit more fun\u2026 \ud83d\ude42<br \/>  fi<\/p>\n<p>  function _exit() # Function to run upon exit of shell.<br \/>  {<br \/>   echo -e &quot;${BRed}Hasta la vista, baby${NC}&quot;<br \/>  }<br \/>  trap _exit EXIT<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # Shell Prompt \u2014 for many examples, see:<br \/>  # <a href=\"http:\/\/www.debian-administration.org\/articles\/205\">www.debian-administration.org\/articles\/205<\/a><br \/>  # <a href=\"http:\/\/www.askapache.com\/linux\/bash-power-prompt.html\">www.askapache.com\/linux\/bash-power-prompt.html<\/a><br \/>  # <a href=\"http:\/\/tldp.org\/HOWTO\/Bash-Prompt-HOWTO\">tldp.org\/HOWTO\/Bash-Prompt-HOWTO<\/a><br \/>  # <a href=\"https:\/\/github.com\/nojhan\/liquidprompt\">github.com\/nojhan\/liquidprompt<\/a><br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # Current Format: [TIME USER@HOST PWD] &gt;<br \/>  # TIME:<br \/>  # Green == machine load is low<br \/>  # Orange == machine load is medium<br \/>  # Red == machine load is high<br \/>  # ALERT == machine load is very high<br \/>  # USER:<br \/>  # Cyan == normal user<br \/>  # Orange == SU to user<br \/>  # Red == root<br \/>  # HOST:<br \/>  # Cyan == local session<br \/>  # Green == secured remote connection (via ssh)<br \/>  # Red == unsecured remote connection<br \/>  # PWD:<br \/>  # Green == more than 10% free disk space<br \/>  # Orange == less than 10% free disk space<br \/>  # ALERT == less than 5% free disk space<br \/>  # Red == current user does not have write privileges<br \/>  # Cyan == current filesystem is size zero (like \/proc)<br \/>  # &gt;:<br \/>  # White == no background or suspended jobs in this shell<br \/>  # Cyan == at least one background job in this shell<br \/>  # Orange == at least one suspended job in this shell<br \/>  #<br \/>  # Command is added to the history file each time you hit enter,<br \/>  # so it&#8217;s available to all shells (using &#8216;history -a&#8217;).<\/p>\n<p>  # Test connection type:<br \/>  if [ -n &quot;${SSH_CONNECTION}&quot; ]; then<br \/>   CNX=${Green} # Connected on remote machine, via ssh (good).<br \/>  elif [[ &quot;${DISPLAY%%:0*}&quot; != &quot;&quot; ]]; then<br \/>   CNX=${ALERT} # Connected on remote machine, not via ssh (bad).<br \/>  else<br \/>   CNX=${BCyan} # Connected on local machine.<br \/>  fi<\/p>\n<p>  # Test user type:<br \/>  if [[ ${USER} == \u00abroot\u00bb ]]; then<br \/>   SU=${Red} # User is root.<br \/>  elif [[ ${USER} != $(logname) ]]; then<br \/>   SU=${BRed} # User is not login user.<br \/>  else<br \/>   SU=${BCyan} # User is normal (well\u2026 most of us are).<br \/>  fi<\/p>\n<p>  NCPU=$(grep -c &#8216;processor&#8217; \/proc\/cpuinfo) # Number of CPUs<br \/>  SLOAD=$(( 100*${NCPU} )) # Small load<br \/>  MLOAD=$(( 200*${NCPU} )) # Medium load<br \/>  XLOAD=$(( 400*${NCPU} )) # Xlarge load<\/p>\n<p>  # Returns system load as percentage, i.e., &#8217;40&#8217; rather than &#8216;0.40)&#8217;.<br \/>  function load()<br \/>  {<br \/>   local SYSLOAD=$(cut -d &quot; &quot; -f1 \/proc\/loadavg | tr -d &#8216;.&#8217;)<br \/>   # System load of the current host.<br \/>   echo $((10#$SYSLOAD)) # Convert to decimal.<br \/>  }<\/p>\n<p>  # Returns a color indicating system load.<br \/>  function load_color()<br \/>  {<br \/>   local SYSLOAD=$(load)<br \/>   if [ ${SYSLOAD} -gt ${XLOAD} ]; then<br \/>   echo -en ${ALERT}<br \/>   elif [ ${SYSLOAD} -gt ${MLOAD} ]; then<br \/>   echo -en ${Red}<br \/>   elif [ ${SYSLOAD} -gt ${SLOAD} ]; then<br \/>   echo -en ${BRed}<br \/>   else<br \/>   echo -en ${Green}<br \/>   fi<br \/>  }<\/p>\n<p>  # Returns a color according to free disk space in $PWD.<br \/>  function disk_color()<br \/>  {<br \/>   if [! -w &quot;${PWD}&quot; ]; then<br \/>   echo -en ${Red}<br \/>   # No &#8216;write&#8217; privilege in the current directory.<br \/>   elif [ -s &quot;${PWD}&quot; ]; then<br \/>   local used=$(command df -P &quot;$PWD&quot; |<br \/>   awk &#8216;END {print $5} {sub(\/%\/,&quot;&quot;)}&#8217;)<br \/>   if [ ${used} -gt 95 ]; then<br \/>   echo -en ${ALERT} # Disk almost full (&gt;95%).<br \/>   elif [ ${used} -gt 90 ]; then<br \/>   echo -en ${BRed} # Free disk space almost gone.<br \/>   else<br \/>   echo -en ${Green} # Free disk space is ok.<br \/>   fi<br \/>   else<br \/>   echo -en ${Cyan}<br \/>   # Current directory is size &#8216;0&#8217; (like \/proc, \/sys etc).<br \/>   fi<br \/>  }<\/p>\n<p>  # Returns a color according to running\/suspended jobs.<br \/>  function job_color()<br \/>  {<br \/>   if [ $(jobs -s | wc -l) -gt \u00ab0\u00bb ]; then<br \/>   echo -en ${BRed}<br \/>   elif [ $(jobs -r | wc -l) -gt \u00ab0\u00bb ]; then<br \/>   echo -en ${BCyan}<br \/>   fi<br \/>  }<\/p>\n<p>  # Adds some text in the terminal frame (if applicable).<\/p>\n<p>  # Now we construct the prompt.<br \/>  PROMPT_COMMAND=\u00abhistory -a\u00bb<br \/>  case ${TERM} in<br \/>   *term | rxvt | linux)<br \/>   PS1=&quot;\\[\\$(load_color)\\][\\A\\[${NC}\\] &quot;<br \/>   # Time of day (with load info):<br \/>   PS1=&quot;\\[\\$(load_color)\\][\\A\\[${NC}\\] &quot;<br \/>   # User@Host (with connection type info):<br \/>   PS1=${PS1}&quot;\\[${SU}\\]\\u\\[${NC}\\]@\\[${CNX}\\]\\h\\[${NC}\\] &quot;<br \/>   # PWD (with &#8216;disk space&#8217; info):<br \/>   PS1=${PS1}&quot;\\[\\$(disk_color)\\]\\W]\\[${NC}\\] &quot;<br \/>   # Prompt (with &#8216;job&#8217; info):<br \/>   PS1=${PS1}&quot;\\[\\$(job_color)\\]&gt;\\[${NC}\\] &quot;<br \/>   # Set title of current xterm:<br \/>   PS1=${PS1}&quot;\\[\\e]0;[\\u@\\h] \\w\\a\\]&quot;<br \/>   ;;<br \/>   *)<br \/>   PS1=&quot;(\\A \\u@\\h \\W) &gt; &quot; # &#8212;&gt; PS1=&quot;(\\A \\u@\\h \\w) &gt; &quot;<br \/>   # &#8212;&gt; Shows full pathname of current dir.<br \/>   ;;<br \/>  esac<\/p>\n<p>  export TIMEFORMAT=$&#8217;\\nreal %3R\\tuser %3U\\tsys %3S\\tpcpu %P\\n&#8217;<br \/>  export HISTIGNORE=&quot;&#038;:bg:fg:ll:h&quot;<br \/>  export HISTTIMEFORMAT=&quot;$(echo -e ${BCyan})[%d\/%m %H:%M:%S]$(echo -e ${NC}) &quot;<br \/>  export HISTCONTROL=ignoredups<br \/>  export HOSTFILE=$HOME\/.hosts # Put a list of remote hosts in ~\/.hosts<\/p>\n<p>  #============================================================<br \/>  #<br \/>  # ALIASES AND FUNCTIONS<br \/>  #<br \/>  # Arguably, some functions defined here are quite big.<br \/>  # If you want to make this file smaller, these functions can<br \/>  #+ be converted into scripts and removed from here.<br \/>  #<br \/>  #============================================================<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # Personnal Aliases<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>  alias rm=&#8217;rm -i&#8217;<br \/>  alias cp=&#8217;cp -i&#8217;<br \/>  alias mv=&#8217;mv -i&#8217;<br \/>  # -&gt; Prevents accidentally clobbering files.<br \/>  alias mkdir=&#8217;mkdir -p&#8217;<\/p>\n<p>  alias h=&#8217;history&#8217;<br \/>  alias j=&#8217;jobs -l&#8217;<br \/>  alias which=&#8217;type -a&#8217;<br \/>  alias ..=&#8217;cd ..&#8217;<\/p>\n<p>  # Pretty-print of some PATH variables:<br \/>  alias path=&#8217;echo -e ${PATH\/\/:\/\\\\n}&#8217;<br \/>  alias libpath=&#8217;echo -e ${LD_LIBRARY_PATH\/\/:\/\\\\n}&#8217;<\/p>\n<p>  alias du=&#8217;du -kh&#8217; # Makes a more readable output.<br \/>  alias df=&#8217;df -kTh&#8217;<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # The &#8216;ls&#8217; family (this assumes you use a recent GNU ls).<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # Add colors for filetype and human-readable sizes by default on &#8216;ls&#8217;:<br \/>  alias ls=&#8217;ls -h &#8212;color&#8217;<br \/>  alias lx=&#8217;ls -lXB&#8217; # Sort by extension.<br \/>  alias lk=&#8217;ls -lSr&#8217; # Sort by size, biggest last.<br \/>  alias lt=&#8217;ls -ltr&#8217; # Sort by date, most recent last.<br \/>  alias lc=&#8217;ls -ltcr&#8217; # Sort by\/show change time,most recent last.<br \/>  alias lu=&#8217;ls -ltur&#8217; # Sort by\/show access time,most recent last.<\/p>\n<p>  # The ubiquitous &#8216;ll&#8217;: directories first, with alphanumeric sorting:<br \/>  alias ll=\u00abls -lv &#8212;group-directories-first\u00bb<br \/>  alias lm=&#8217;ll |more&#8217; # Pipe through &#8216;more&#8217;<br \/>  alias lr=&#8217;ll -R&#8217; # Recursive ls.<br \/>  alias la=&#8217;ll -A&#8217; # Show hidden files.<br \/>  alias tree=&#8217;tree -Csuh&#8217; # Nice alternative to &#8216;recursive ls&#8217;\u2026<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # Tailoring &#8216;less&#8217;<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>  alias more=&#8217;less&#8217;<br \/>  export PAGER=less<br \/>  export LESSCHARSET=&#8217;latin1&#8242;<br \/>  export LESSOPEN=&#8217;|\/usr\/bin\/lesspipe.sh %s 2&gt;&#038;-&#8216;<br \/>   # Use this if lesspipe.sh exists.<br \/>  export LESS=&#8217;-i -N -w -z-4 -g -e -M -X -F -R -P%t?f%f \\<br \/>  :stdin .?pb%pb\\%:?lbLine %lb:?bbByte %bb:-&#8230;&#8217;<\/p>\n<p>  # LESS man page colors (makes Man pages more readable).<br \/>  export LESS_TERMCAP_mb=$&#8217;\\E[01;31m&#8217;<br \/>  export LESS_TERMCAP_md=$&#8217;\\E[01;31m&#8217;<br \/>  export LESS_TERMCAP_me=$&#8217;\\E[0m&#8217;<br \/>  export LESS_TERMCAP_se=$&#8217;\\E[0m&#8217;<br \/>  export LESS_TERMCAP_so=$&#8217;\\E[01;44;33m&#8217;<br \/>  export LESS_TERMCAP_ue=$&#8217;\\E[0m&#8217;<br \/>  export LESS_TERMCAP_us=$&#8217;\\E[01;32m&#8217;<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # Spelling typos \u2014 highly personnal and keyboard-dependent \ud83d\ude42<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>  alias xs=&#8217;cd&#8217;<br \/>  alias vf=&#8217;cd&#8217;<br \/>  alias moer=&#8217;more&#8217;<br \/>  alias moew=&#8217;more&#8217;<br \/>  alias kk=&#8217;ll&#8217;<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # A few fun ones<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>  # Adds some text in the terminal frame (if applicable).<\/p>\n<p>  function xtitle()<br \/>  {<br \/>   case &quot;$TERM&quot; in<br \/>   *term* | rxvt)<br \/>   echo -en &quot;\\e]0;$*\\a&quot; ;;<br \/>   *) ;;<br \/>   esac<br \/>  }<\/p>\n<p>  # Aliases that use xtitle<br \/>  alias top=&#8217;xtitle Processes on $HOST &#038;&#038; top&#8217;<br \/>  alias make=&#8217;xtitle Making $(basename $PWD); make&#8217;<\/p>\n<p>  #\u2026 and functions<br \/>  function man()<br \/>  {<br \/>   for i; do<br \/>   xtitle The $(basename $1|tr -d .[:digit:]) manual<br \/>   command man -a &quot;$i&quot;<br \/>   done<br \/>  }<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # Make the following commands run in background automatically:<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>  function te() # wrapper around xemacs\/gnuserv<br \/>  {<br \/>   if [ &quot;$(gnuclient -batch -eval t 2&gt;&#038;-)&quot; == \u00abt\u00bb ]; then<br \/>   gnuclient -q &quot;$@&quot;;<br \/>   else<br \/>   ( xemacs &quot;$@&quot; &#038;);<br \/>   fi<br \/>  }<\/p>\n<p>  function soffice() { command soffice &quot;$@&quot; &#038; }<br \/>  function firefox() { command firefox &quot;$@&quot; &#038; }<br \/>  function xpdf() { command xpdf &quot;$@&quot; &#038; }<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # File &#038; strings related functions:<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>  # Find a file with a pattern in name:<br \/>  function ff() { find. -type f -iname &#8216;*&#8217;&quot;$*&quot;&#8217;*&#8217; -ls; }<\/p>\n<p>  # Find a file with pattern $1 in name and Execute $2 on it:<br \/>  function fe() { find. -type f -iname &#8216;*&#8217;&quot;${1:-}&quot;&#8217;*&#8217; \\<br \/>  -exec ${2:-file} {} \\;; }<\/p>\n<p>  # Find a pattern in a set of files and highlight them:<br \/>  #+ (needs a recent version of egrep).<br \/>  function fstr()<br \/>  {<br \/>   OPTIND=1<br \/>   local mycase=&quot;&quot;<br \/>   local usage=\u00abfstr: find string in files.<br \/>  Usage: fstr [-i] \\\u00bbpattern\\&quot; [\\\u00abfilename pattern\\\u00bb] &quot;<br \/>   while getopts :it opt<br \/>   do<br \/>   case &quot;$opt&quot; in<br \/>   i) mycase=&quot;-i &quot; ;;<br \/>   *) echo &quot;$usage&quot;; return ;;<br \/>   esac<br \/>   done<br \/>   shift $(( $OPTIND \u2014 1 ))<br \/>   if [ &quot;$#&quot; -lt 1 ]; then<br \/>   echo &quot;$usage&quot;<br \/>   return;<br \/>   fi<br \/>   find. -type f -name &quot;${2:-*}&quot; -print0 | \\<br \/>  xargs -0 egrep &#8212;color=always -sn ${case} &quot;$1&quot; 2&gt;&#038;- | more<\/p>\n<p>  }<\/p>\n<p>  function swap()<br \/>  { # Swap 2 filenames around, if they exist (from Uzi&#8217;s bashrc).<br \/>   local TMPFILE=tmp.$$<\/p>\n<p>  [ $# -ne 2 ] &#038;&#038; echo \u00abswap: 2 arguments needed\u00bb &#038;&#038; return 1<br \/>   [! -e $1 ] &#038;&#038; echo \u00abswap: $1 does not exist\u00bb &#038;&#038; return 1<br \/>   [! -e $2 ] &#038;&#038; echo \u00abswap: $2 does not exist\u00bb &#038;&#038; return 1<\/p>\n<p>  mv &quot;$1&quot; $TMPFILE<br \/>   mv &quot;$2&quot; &quot;$1&quot;<br \/>   mv $TMPFILE &quot;$2&quot;<br \/>  }<\/p>\n<p>  function extract() # Handy Extract Program<br \/>  {<br \/>   if [ -f $1 ]; then<br \/>   case $1 in<br \/>   *.tar.bz2) tar xvjf $1 ;;<br \/>   *.tar.gz) tar xvzf $1 ;;<br \/>   *.bz2) bunzip2 $1 ;;<br \/>   *.rar) unrar x $1 ;;<br \/>   *.gz) gunzip $1 ;;<br \/>   *.tar) tar xvf $1 ;;<br \/>   *.tbz2) tar xvjf $1 ;;<br \/>   *.tgz) tar xvzf $1 ;;<br \/>   *.zip) unzip $1 ;;<br \/>   *.Z) uncompress $1 ;;<br \/>   *.7z) 7z x $1 ;;<br \/>   *) echo &quot;&#8217;$1&#8242; cannot be extracted via &gt;extract&lt;&quot; ;;<br \/>   esac<br \/>   else<br \/>   echo &quot;&#8217;$1&#8242; is not a valid file!&quot;<br \/>   fi<br \/>  }<\/p>\n<p>  # Creates an archive (*.tar.gz) from given directory.<br \/>  function maketar() { tar cvzf &quot;${1%%\/}.tar.gz&quot; &quot;${1%%\/}\/&quot;; }<\/p>\n<p>  # Create a ZIP archive of a file or folder.<br \/>  function makezip() { zip -r &quot;${1%%\/}.zip&quot; &quot;$1&quot;; }<\/p>\n<p>  # Make your directories and files access rights sane.<br \/>  function sanitize() { chmod -R u=rwX,g=rX,o= &quot;$@&quot; ;}<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # Process\/system related functions:<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>  function my_ps() { ps $@ -u $USER -o pid,%cpu,%mem,bsdtime,command; }<br \/>  function pp() { my_ps f | awk &#8216;!\/awk\/ &#038;&#038; $0~var&#8217; var=${1:-&quot;.*&quot;}; }<\/p>\n<p>  function killps() # kill by process name<br \/>  {<br \/>   local pid pname sig=&quot;-TERM&quot; # default signal<br \/>   if [ &quot;$#&quot; -lt 1 ] || [ &quot;$#&quot; -gt 2 ]; then<br \/>   echo \u00abUsage: killps [-SIGNAL] pattern\u00bb<br \/>   return;<br \/>   fi<br \/>   if [ $# = 2 ]; then sig=$1; fi<br \/>   for pid in $(my_ps| awk &#8216;!\/awk\/ &#038;&#038; $0~pat { print $1 }&#8217; pat=${!#} )<br \/>   do<br \/>   pname=$(my_ps | awk &#8216;$1~var { print $5 }&#8217; var=$pid )<br \/>   if ask \u00abKill process $pid &lt;$pname&gt; with signal $sig?\u00bb<br \/>   then kill $sig $pid<br \/>   fi<br \/>   done<br \/>  }<\/p>\n<p>  function mydf() # Pretty-print of &#8216;df&#8217; output.<br \/>  { # Inspired by &#8216;dfc&#8217; utility.<br \/>   for fs; do<\/p>\n<p>  if [! -d $fs ]<br \/>   then<br \/>   echo -e $fs&quot; :No such file or directory&quot;; continue<br \/>   fi<\/p>\n<p>  local info=( $(command df -P $fs | awk &#8216;END{ print $2,$3,$5 }&#8217;) )<br \/>   local free=( $(command df -Pkh $fs | awk &#8216;END{ print $4 }&#8217;) )<br \/>   local nbstars=$(( 20 * ${info[1]} \/ ${info[0]} ))<br \/>   local out=&quot;[&quot;<br \/>   for ((j=0;j&lt;20;j++)); do<br \/>   if [ ${j} -lt ${nbstars} ]; then<br \/>   out=$out&quot;*&quot;<br \/>   else<br \/>   out=$out&quot;-&quot;<br \/>   fi<br \/>   done<br \/>   out=${info[2]}&quot; &quot;$out&quot;] (&quot;$free&quot; free on &quot;$fs&quot;)&quot;<br \/>   echo -e $out<br \/>   done<br \/>  }<\/p>\n<p>  function my_ip() # Get IP adress on ethernet.<br \/>  {<br \/>   MY_IP=$(\/sbin\/ifconfig eth0 | awk &#8216;\/inet\/ { print $2 } &#8216; |<br \/>   sed -e s\/addr:\/\/)<br \/>   echo ${MY_IP:-\u00abNot connected\u00bb}<br \/>  }<\/p>\n<p>  function ii() # Get current host related info.<br \/>  {<br \/>   echo -e &quot;\\nYou are logged on ${BRed}$HOST&quot;<br \/>   echo -e &quot;\\n${BRed}Additionnal information:$NC &quot;; uname -a<br \/>   echo -e &quot;\\n${BRed}Users logged on:$NC &quot;; w -hs |<br \/>   cut -d &quot; &quot; -f1 | sort | uniq<br \/>   echo -e &quot;\\n${BRed}Current date :$NC &quot;; date<br \/>   echo -e &quot;\\n${BRed}Machine stats :$NC &quot;; uptime<br \/>   echo -e &quot;\\n${BRed}Memory stats :$NC &quot;; free<br \/>   echo -e &quot;\\n${BRed}Diskspace :$NC &quot;; mydf \/ $HOME<br \/>   echo -e &quot;\\n${BRed}Local IP Address :$NC&quot;; my_ip<br \/>   echo -e &quot;\\n${BRed}Open connections :$NC &quot;; netstat -pan &#8212;inet;<br \/>   echo<br \/>  }<\/p>\n<p>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  # Misc utilities:<br \/>  #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>  function repeat() # Repeat n times command.<br \/>  {<br \/>   local i max<br \/>   max=$1; shift;<br \/>   for ((i=1; i &lt;= max; i++)); do # &#8212;&gt; C-like syntax<br \/>   eval &quot;$@&quot;;<br \/>   done<br \/>  }<\/p>\n<p>  function ask() # See &#8216;killps&#8217; for example of use.<br \/>  {<br \/>   echo -n &quot;$@&quot; &#8216;[y\/n] &#8216;; read ans<br \/>   case &quot;$ans&quot; in<br \/>   y*|Y*) return 0 ;;<br \/>   *) return 1 ;;<br \/>   esac<br \/>  }<\/p>\n<p>  function corename() # Get name of app that created a corefile.<br \/>  {<br \/>   for file; do<br \/>   echo -n $file:; gdb &#8212;core=$file &#8212;batch | head -1<br \/>   done<br \/>  }<\/p>\n<p>  #=========================================================================<br \/>  #<br \/>  # PROGRAMMABLE COMPLETION SECTION<br \/>  # Most are taken from the bash 2.05 documentation and from Ian McDonald&#8217;s<br \/>  # &#8216;Bash completion&#8217; package (http:\/\/www.caliban.org\/bash\/#completion)<br \/>  # You will in fact need bash more recent then 3.0 for some features.<br \/>  #<br \/>  # Note that most linux distributions now provide many completions<br \/>  # &#8216;out of the box&#8217; \u2014 however, you might need to make your own one day,<br \/>  # so I kept those here as examples.<br \/>  #=========================================================================<\/p>\n<p>  if [ &quot;${BASH_VERSION%.*}&quot; \\&lt; \u00ab3.0\u00bb ]; then<br \/>   echo \u00abYou will need to upgrade to version 3.0 for full \\<br \/>   programmable completion features\u00bb<br \/>   return<br \/>  fi<\/p>\n<p>  shopt -s extglob # Necessary.<\/p>\n<p>  complete -A hostname rsh rcp telnet rlogin ftp ping disk<br \/>  complete -A export printenv<br \/>  complete -A variable export local readonly unset<br \/>  complete -A enabled builtin<br \/>  complete -A alias alias unalias<br \/>  complete -A function function<br \/>  complete -A user su mail finger<\/p>\n<p>  complete -A helptopic help # Currently same as builtins.<br \/>  complete -A shopt shopt<br \/>  complete -A stopped -P &#8216;%&#8217; bg<br \/>  complete -A job -P &#8216;%&#8217; fg jobs disown<\/p>\n<p>  complete -A directory mkdir rmdir<br \/>  complete -A directory -o default cd<\/p>\n<p>  # Compression<br \/>  complete -f -o default -X &#8216;*.+(zip|ZIP)&#8217; zip<br \/>  complete -f -o default -X &#8216;!*.+(zip|ZIP)&#8217; unzip<br \/>  complete -f -o default -X &#8216;*.+(z|Z)&#8217; compress<br \/>  complete -f -o default -X &#8216;!*.+(z|Z)&#8217; uncompress<br \/>  complete -f -o default -X &#8216;*.+(gz|GZ)&#8217; gzip<br \/>  complete -f -o default -X &#8216;!*.+(gz|GZ)&#8217; gunzip<br \/>  complete -f -o default -X &#8216;*.+(bz2|BZ2)&#8217; bzip2<br \/>  complete -f -o default -X &#8216;!*.+(bz2|BZ2)&#8217; bunzip2<br \/>  complete -f -o default -X &#8216;!*.+(zip|ZIP|z|Z|gz|GZ|bz2|BZ2)&#8217; extract<\/p>\n<p>  # Documents \u2014 Postscript,pdf,dvi\u2026<br \/>  complete -f -o default -X &#8216;!*.+(ps|PS)&#8217; gs ghostview ps2pdf ps2ascii<br \/>  complete -f -o default -X \\<br \/>  &#8216;!*.+(dvi|DVI)&#8217; dvips dvipdf xdvi dviselect dvitype<br \/>  complete -f -o default -X &#8216;!*.+(pdf|PDF)&#8217; acroread pdf2ps<br \/>  complete -f -o default -X &#8216;!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?\\<br \/>  (.gz|.GZ|.bz2|.BZ2|.Z))&#8217; gv ggv<br \/>  complete -f -o default -X &#8216;!*.texi*&#8217; makeinfo texi2dvi texi2html texi2pdf<br \/>  complete -f -o default -X &#8216;!*.tex&#8217; tex latex slitex<br \/>  complete -f -o default -X &#8216;!*.lyx&#8217; lyx<br \/>  complete -f -o default -X &#8216;!*.+(htm*|HTM*)&#8217; lynx html2ps<br \/>  complete -f -o default -X \\<br \/>  &#8216;!*.+(doc|DOC|xls|XLS|ppt|PPT|sx?|SX?|csv|CSV|od?|OD?|ott|OTT)&#8217; soffice<\/p>\n<p>  # Multimedia<br \/>  complete -f -o default -X \\<br \/>  &#8216;!*.+(gif|GIF|jp*g|JP*G|bmp|BMP|xpm|XPM|png|PNG)&#8217; xv gimp ee gqview<br \/>  complete -f -o default -X &#8216;!*.+(mp3|MP3)&#8217; mpg123 mpg321<br \/>  complete -f -o default -X &#8216;!*.+(ogg|OGG)&#8217; ogg123<br \/>  complete -f -o default -X \\<br \/>  &#8216;!*.@(mp[23]|MP[23]|ogg|OGG|wav|WAV|pls|\\<br \/>  m3u|xm|mod|s[3t]m|it|mtm|ult|flac)&#8217; xmms<br \/>  complete -f -o default -X &#8216;!*.@(mp?(e)g|MP?(E)G|wma|avi|AVI|\\<br \/>  asf|vob|VOB|bin|dat|vcd|ps|pes|fli|viv|rm|ram|yuv|mov|MOV|qt|\\<br \/>  QT|wmv|mp3|MP3|ogg|OGG|ogm|OGM|mp4|MP4|wav|WAV|asx|ASX)&#8217; xine<\/p>\n<p>  complete -f -o default -X &#8216;!*.pl&#8217; perl perl5<\/p>\n<p>  # This is a &#8216;universal&#8217; completion function \u2014 it works when commands have<br \/>  #+ a so-called &#8216;long options&#8217; mode, ie: &#8216;ls &#8212;all&#8217; instead of &#8216;ls -a&#8217;<br \/>  # Needs the &#8216;-o&#8217; option of grep<br \/>  #+ (try the commented-out version if not available).<\/p>\n<p>  # First, remove &#8216;=&#8217; from completion word separators<br \/>  #+ (this will allow completions like &#8216;ls &#8212;color=auto&#8217; to work correctly).<\/p>\n<p>  COMP_WORDBREAKS=${COMP_WORDBREAKS\/=\/}<\/p>\n<p>  _get_longopts()<br \/>  {<br \/>   #$1 &#8212;help | sed -e &#8216;\/&#8212;\/!d&#8217; -e &#8216;s\/.*&#8212;\\([^[:space:].,]*\\).*\/&#8212;\\1\/&#8217;| \\<br \/>   #grep ^&quot;$2&quot; |sort -u;<br \/>   $1 &#8212;help | grep -o -e &quot;&#8212;[^[:space:].,]*&quot; | grep -e &quot;$2&quot; |sort -u<br \/>  }<\/p>\n<p>  _longopts()<br \/>  {<br \/>   local cur<br \/>   cur=${COMP_WORDS[COMP_CWORD]}<\/p>\n<p>  case &quot;${cur:-*}&quot; in<br \/>   -*) ;;<br \/>   *) return ;;<br \/>   esac<\/p>\n<p>  case &quot;$1&quot; in<br \/>   \\~*) eval cmd=&quot;$1&quot; ;;<br \/>   *) cmd=&quot;$1&quot; ;;<br \/>   esac<br \/>   COMPREPLY=( $(_get_longopts ${1} ${cur} ) )<br \/>  }<br \/>  complete -o default -F _longopts configure bash<br \/>  complete -o default -F _longopts wget id info a2ps ls recode<\/p>\n<p>  _tar()<br \/>  {<br \/>   local cur ext regex tar untar<\/p>\n<p>  COMPREPLY=()<br \/>   cur=${COMP_WORDS[COMP_CWORD]}<\/p>\n<p>  # If we want an option, return the possible long options.<br \/>   case &quot;$cur&quot; in<br \/>   -*) COMPREPLY=( $(_get_longopts $1 $cur ) ); return 0;;<br \/>   esac<\/p>\n<p>  if [ $COMP_CWORD -eq 1 ]; then<br \/>   COMPREPLY=( $( compgen -W &#8216;c t x u r d A&#8217; \u2014 $cur ) )<br \/>   return 0<br \/>   fi<\/p>\n<p>  case &quot;${COMP_WORDS[1]}&quot; in<br \/>   ?(-)c*f)<br \/>   COMPREPLY=( $( compgen -f $cur ) )<br \/>   return 0<br \/>   ;;<br \/>   +([^Izjy])f)<br \/>   ext=&#8217;tar&#8217;<br \/>   regex=$ext<br \/>   ;;<br \/>   *z*f)<br \/>   ext=&#8217;tar.gz&#8217;<br \/>   regex=&#8217;t\\(ar\\.\\)\\(gz\\|Z\\)&#8217;<br \/>   ;;<br \/>   *[Ijy]*f)<br \/>   ext=&#8217;t?(ar.)bz?(2)&#8217;<br \/>   regex=&#8217;t\\(ar\\.\\)bz2\\?&#8217;<br \/>   ;;<br \/>   *)<br \/>   COMPREPLY=( $( compgen -f $cur ) )<br \/>   return 0<br \/>   ;;<\/p>\n<p>  esac<\/p>\n<p>  if [[ &quot;$COMP_LINE&quot; == tar*.$ext&#8217; &#8216;* ]]; then<br \/>   # Complete on files in tar file.<br \/>   #<br \/>   # Get name of tar file from command line.<br \/>   tar=$( echo &quot;$COMP_LINE&quot; | \\<br \/>   sed -e &#8216;s|^.* \\([^ ]*&#8217;$regex&#8217;\\) .*$|\\1|&#8217; )<br \/>   # Devise how to untar and list it.<br \/>   untar=t${COMP_WORDS[1]\/\/[^Izjyf]\/}<\/p>\n<p>  COMPREPLY=( $( compgen -W &quot;$( echo $( tar $untar $tar \\<br \/>   2&gt;\/dev\/null ) )&quot; \u2014 &quot;$cur&quot; ) )<br \/>   return 0<\/p>\n<p>  else<br \/>   # File completion on relevant files.<br \/>   COMPREPLY=( $( compgen -G $cur\\*.$ext ) )<\/p>\n<p>  fi<\/p>\n<p>  return 0<\/p>\n<p>  }<\/p>\n<p>  complete -F _tar -o default tar<\/p>\n<p>  _make()<br \/>  {<br \/>   local mdef makef makef_dir=&quot;.&quot; makef_inc gcmd cur prev i;<br \/>   COMPREPLY=();<br \/>   cur=${COMP_WORDS[COMP_CWORD]};<br \/>   prev=${COMP_WORDS[COMP_CWORD-1]};<br \/>   case &quot;$prev&quot; in<br \/>   -*f)<br \/>   COMPREPLY=($(compgen -f $cur ));<br \/>   return 0<br \/>   ;;<br \/>   esac;<br \/>   case &quot;$cur&quot; in<br \/>   -*)<br \/>   COMPREPLY=($(_get_longopts $1 $cur ));<br \/>   return 0<br \/>   ;;<br \/>   esac;<\/p>\n<p>  #\u2026 make reads<br \/>   # GNUmakefile,<br \/>   # then makefile<br \/>   # then Makefile\u2026<br \/>   if [ -f ${makef_dir}\/GNUmakefile ]; then<br \/>   makef=${makef_dir}\/GNUmakefile<br \/>   elif [ -f ${makef_dir}\/makefile ]; then<br \/>   makef=${makef_dir}\/makefile<br \/>   elif [ -f ${makef_dir}\/Makefile ]; then<br \/>   makef=${makef_dir}\/Makefile<br \/>   else<br \/>   makef=${makef_dir}\/*.mk # Local convention.<br \/>   fi<\/p>\n<p>  # Before we scan for targets, see if a Makefile name was<br \/>   #+ specified with -f.<br \/>   for (( i=0; i &lt; ${#COMP_WORDS[@]}; i++ )); do<br \/>   if [[ ${COMP_WORDS[i]} == -f ]]; then<br \/>   # eval for tilde expansion<br \/>   eval makef=${COMP_WORDS[i+1]}<br \/>   break<br \/>   fi<br \/>   done<br \/>   [! -f $makef ] &#038;&#038; return 0<\/p>\n<p>  # Deal with included Makefiles.<br \/>   makef_inc=$( grep -E &#8216;^-?include&#8217; $makef |<br \/>   sed -e \u00abs,^.* ,\u00bb$makef_dir&quot;\/,&quot; )<br \/>   for file in $makef_inc; do<br \/>   [ -f $file ] &#038;&#038; makef=&quot;$makef $file&quot;<br \/>   done<\/p>\n<p>  # If we have a partial word to complete, restrict completions<br \/>   #+ to matches of that word.<br \/>   if [ -n &quot;$cur&quot; ]; then gcmd=&#8217;grep &quot;^$cur&quot;&#8217;; else gcmd=cat; fi<\/p>\n<p>  COMPREPLY=( $( awk -F&#8217;:&#8217; &#8216;\/^[a-zA-Z0-9][^$#\\\/\\t=]*:([^=]|$)\/ \\<br \/>   {split($1,A,\/ \/);for(i in A)print A[i]}&#8217; \\<br \/>   $makef 2&gt;\/dev\/null | eval $gcmd ))<\/p>\n<p>  }<\/p>\n<p>  complete -F _make -X &#8216;+($*|*.[cho])&#8217; make gmake pmake<\/p>\n<p>  _killall()<br \/>  {<br \/>   local cur prev<br \/>   COMPREPLY=()<br \/>   cur=${COMP_WORDS[COMP_CWORD]}<\/p>\n<p>  # Get a list of processes<br \/>   #+ (the first sed evaluation<br \/>   #+ takes care of swapped out processes, the second<br \/>   #+ takes care of getting the basename of the process).<br \/>   COMPREPLY=( $( ps -u $USER -o comm | \\<br \/>   sed -e &#8216;1,1d&#8217; -e &#8216;s#[]\\[]##g&#8217; -e &#8216;s#^.*\/##&#8217;| \\<br \/>   awk &#8216;{if ($0 ~ \/^&#8217;$cur&#8217;\/) print $0}&#8217; ))<\/p>\n<p>  return 0<br \/>  }<\/p>\n<p>  complete -F _killall killall killps<\/p>\n<p>  # Local Variables:<br \/>  # mode:shell-script<br \/>  # sh-shell:bash<br \/>  # End:<br \/>  And, here is a snippet from Andrzej Szelachowski&#8217;s instructive .bash_profile file.<\/p>\n<p>  Example M-2. .bash_profile file<\/p>\n<p>  # From Andrzej Szelachowski&#8217;s ~\/.bash_profile:<\/p>\n<p>  # Note that a variable may require special treatment<br \/>  #+ if it will be exported.<\/p>\n<p>  DARKGRAY=&#8217;\\e[1;30m&#8217;<br \/>  LIGHTRED=&#8217;\\e[1;31m&#8217;<br \/>  GREEN=&#8217;\\e[32m&#8217;<br \/>  YELLOW=&#8217;\\e[1;33m&#8217;<br \/>  LIGHTBLUE=&#8217;\\e[1;34m&#8217;<br \/>  NC=&#8217;\\e[m&#8217;<\/p>\n<p>  PCT=&quot;\\`if [[ \\$EUID -eq 0 ]]; then T=&#8217;$LIGHTRED&#8217;; else T=&#8217;$LIGHTBLUE&#8217;; fi; <br \/>  echo \\$T \\`&quot;<\/p>\n<p>  # For \u00abliteral\u00bb command substitution to be assigned to a variable,<br \/>  #+ use escapes and double quotes:<br \/>  #+ PCT=&quot;\\`\u2026 \\`&quot;&#8230;<br \/>  # Otherwise, the value of PCT variable is assigned only once,<br \/>  #+ when the variable is exported\/read from .bash_profile,<br \/>  #+ and it will not change afterwards even if the user ID changes.<\/p>\n<p>  PS1=&quot;\\n$GREEN[\\w] \\n$DARKGRAY($PCT\\t$DARKGRAY)-($PCT\\u$DARKGRAY)-($PCT\\!<br \/>  $DARKGRAY)$YELLOW-&gt; $NC&quot;<\/p>\n<p>  # Escape a variables whose value changes:<br \/>  # if [[ \\$EUID -eq 0 ]],<br \/>  # Otherwise the value of the EUID variable will be assigned only once,<br \/>  #+ as above.<\/p>\n<p>  # When a variable is assigned, it should be called escaped:<br \/>  #+ echo \\$T,<br \/>  # Otherwise the value of the T variable is taken from the moment the PCT <br \/>  #+ variable is exported\/read from .bash_profile.<br \/>  # So, in this example it would be null.<\/p>\n<p>  # When a variable&#8217;s value contains a semicolon it should be strong quoted:<br \/>  # T=&#8217;$LIGHTRED&#8217;,<br \/>  # Otherwise, the semicolon will be interpreted as a command separator.<\/p>\n<p>  # Variables PCT and PS1 can be merged into a new PS1 variable:<\/p>\n<p>  PS1=&quot;\\`if [[ \\$EUID -eq 0 ]]; then PCT=&#8217;$LIGHTRED&#8217;;<br \/>  else PCT=&#8217;$LIGHTBLUE&#8217;; fi; <br \/>  echo &#8216;\\n$GREEN[\\w] \\n$DARKGRAY(&#8216;\\$PCT&#8217;\\t$DARKGRAY)-\\<br \/>  (&#8216;\\$PCT&#8217;\\u$DARKGRAY)-(&#8216;\\$PCT&#8217;\\!$DARKGRAY)$YELLOW-&gt; $NC&#8217;\\`&quot;<\/p>\n<p>  # The trick is to use strong quoting for parts of old PS1 variable.<\/p><\/div>\n<\/div>\n<p>\u041a\u0430\u043a \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0432\u044b\u0445\u043e\u0434, \u043e\u0434\u043d\u0430\u043a\u043e, \u0412\u044b \u0438\u043c\u0435\u0435\u0442\u0435 \u043c\u043d\u043e\u0433\u043e \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0412\u044b \u0432\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0435 \u0432 \u044d\u0442\u0443 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443.<\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 PS1 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0432 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u043d\u043e \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0434\u0438\u043d \u0438\u0437 \u0412\u0430\u0448\u0438\u0445 \u0442\u043e\u0447\u0435\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 &quot;$&quot;, \u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u044f\u0442 \u044d\u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0432\u0435\u0449\u0438, \u043a\u0430\u043a \u0438\u043c\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043b\u0438 \u0412\u0430\u0448\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0427\u0442\u043e \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f? \u041e\u0442\u0432\u0435\u0440\u0433\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u00abseeintgs\u00bb \u0438\u043b\u0438 \u0412\u0430\u0448 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u043d\u0430\u043a &quot;&gt;&quot;.<\/p>\n<p>  \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 PS2 \u2014 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0443\u0442\u0438 \u0412\u0430\u0448\u0438\u0445 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a \u043a\u043e\u0433\u0434\u0430 \u0412\u044b \u0432 \u201c\u043f\u0435\u0442\u043b\u0435\u201d. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u201cecho \\\u201d.  <\/p>\n<pre><code class=\"html\"># echo \\ &gt;  <\/code><\/pre>\n<p>  \u0412\u0430\u0448\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430. \u041d\u0435 \u043c\u043e\u0433\u0443 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0434\u0435\u043d\u044c? \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0412\u0430\u0448\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043f\u043e \u0434\u0430\u0442\u0435:  <\/p>\n<pre><code class=\"html\">PS1='\\d&gt;' Tue Dec 22&gt; <\/code><\/pre>\n<p>  \u0425\u043e\u0442\u0438\u0442\u0435 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u044b \u0447\u0442\u043e \u0412\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0434\u043e \u043f\u043e\u043b\u0443\u043d\u043e\u0447\u0438? \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0412\u0430\u0448\u0443 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443 \u0441 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c.  <\/p>\n<pre><code class=\"html\">Tue Dec 22&gt;PS1=&quot;\\@&gt; &quot; 08:55 AM&gt; <\/code><\/pre>\n<p>  \u0410 \u0442\u0430\u043a\u0436\u0435, \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432 \u0441\u0432\u043e\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u2014 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0435\u0441\u043b\u0438 \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c, \u043a\u0430\u043a \u0434\u043e\u043b\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0412\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443.  <\/p>\n<pre><code class=\"html\">08:58 AM&gt; PS1=&quot;\\D{}&gt; &quot; 08:59:01 AM&gt;  <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0412\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u0442\u0435 24-\u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u201c\\A\u201d \u0438\u043b\u0438 \u201c\\t\u201d.   <\/p>\n<pre><code class=\"html\">08:59:01 AM&gt; PS1=&quot;\\A&gt; &quot; 09:10&gt;  09:10&gt; PS1=&quot;\\t&gt; &quot; 09:10:36&gt; <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u201c&gt;\u201d \u0432 \u043a\u043e\u043d\u0446\u0435 \u044d\u0442\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0438 \u043f\u0440\u043e\u0431\u0435\u043b, \u043a\u0430\u043a \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u043d\u043e \u044d\u0442\u043e \u043c\u043e\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u0435. \u041c\u043d\u0435 \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u044d\u0442\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u043e\u0442\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u043c\u043e\u044e \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443 \u043e\u0442 \u043c\u043e\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434. \u0415\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435\u043c, \u0447\u0442\u043e \u0412\u044b \u0432\u043e\u0448\u043b\u0438 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443?  <\/p>\n<pre><code class=\"html\">lw1777PS1='\\h ' lw1777 <\/code><\/pre>\n<p>  \u0425\u043e\u0442\u0438\u0442\u0435 \u043f\u043b\u043e\u0445\u043e \u0441\u0435\u0431\u044f \u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0412\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u0430\u043d\u0434, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443?  <\/p>\n<pre><code class=\"html\">lw1777 PS1='\\# ' 22 <\/code><\/pre>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435! \u0415\u0441\u043b\u0438 \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0433\u0434\u0435 \u0412\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u0412\u0430\u0448\u0435\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0431\u0443\u0444\u0435\u0440\u0430.  <\/p>\n<pre><code class=\"html\">22&gt; PS1='\\!&gt; ' 234&gt; <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0433\u0434\u0435 \u0412\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u201cw\u201d \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0412\u0430\u0448 \u043f\u0443\u0442\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438.  <\/p>\n<pre><code class=\"html\">PS1='\\w ' ~ <\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0412\u044b \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0435\u0441\u044c \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0434\u0431\u0430\u0434\u0440\u0438\u0432\u0430\u043d\u0438\u0435:   <\/p>\n<pre><code class=\"html\">$ PS1=':-) ' :-) <\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0412\u044b \u0438\u043c\u0435\u0435\u0442\u0435 \u0430\u043c\u043d\u0435\u0437\u0438\u044e \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0432 \u043a\u0430\u043a\u043e\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0412\u044b \u0432\u043e\u0448\u043b\u0438:  <\/p>\n<pre><code class=\"html\">PS1=&quot;\\u&gt; &quot; lmoore&gt; <\/code><\/pre>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u044d\u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0438\u043c\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u0430\u043a \u044d\u0442\u043e:  <\/p>\n<pre><code class=\"html\">PS1=&quot;\\u@\\h &quot; PS1=&quot;\\u@\\h &quot; root@lw1777 <\/code><\/pre>\n<p>  \u041b\u044e\u0431\u043e\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u201cdin\u201d \u0412\u0430\u0448\u0435\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u043e\u0439, \u0445\u043e\u0442\u044f \u044f \u043f\u043e\u043b\u0430\u0433\u0430\u044e \u0447\u0442\u043e \u043c\u0430\u043b\u043e \u0438\u0437 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u044b\u0448\u0430\u0442\u044c \u043a\u043e\u043b\u043e\u043a\u043e\u043b \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043e\u0431\u0440\u0430\u0437 \u0441\u0442\u0440\u0443\u043d\u044b \u0432 \u043d\u0430\u0448\u0435\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0435.  <\/p>\n<pre><code class=\"html\">\\a     an ASCII bell character (07) \\d     the date  in  &quot;Weekday  Month  Date&quot;  format (e.g.,       &quot;Tue May 26&quot;) \\e     an ASCII escape character (033) \\h     the hostname up to the first `.' \\H     the hostname \\j     the  number of jobs currently managed by the shell \\l     the basename of the shell's terminal  device name \\n     newline \\r     carriage return \\s     the  name  of  the shell, the basename of $0 (the       portion following the final slash) \\t     the current time in 24-hour HH:MM:SS format \\T     the current time in 12-hour HH:MM:SS format \\@     the current time in 12-hour am\/pm format \\u     the username of the current user \\v     the version of bash (e.g., 2.00) \\V     the release of bash,  version  +  patch level (e.g.,       2.00.0) \\w     the current working directory \\W     the  basename  of the current working directory \\!     the history number of this command \\#     the command number of this command \\$     if the effective UID is 0, a #, otherwise a $ \\nnn   the  character  corresponding  to  the octal number nnn \\\\     a backslash \\[     begin a sequence of non-printing characters, which could       be used to embed a terminal control        sequence into the prompt \\]     end a sequence of non-printing characters <\/code><\/pre>\n<p>  \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0430 \u0412\u0430\u0448\u0443 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443, \u043d\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u0437\u0430\u0433\u0432\u043e\u0437\u0434\u043a\u0430. \u0415\u0441\u043b\u0438 \u0412\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043e\u0434\u043d\u0443 \u0441 bash \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a, \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (like \\d and \\@), \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 PS1 \u0438 \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 PS1 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0434\u0430\u0442\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0412\u0430\u0448\u0430 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u0442\u0443 \u0438 \u0432\u0440\u0435\u043c\u044f, \u043f\u043e\u043a\u0430 \u0412\u044b \u043d\u0435 \u0432\u044b\u0439\u0434\u0435\u0442\u0435 \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.  <\/p>\n<pre><code class=\"html\">root@lw1777 PS1=&quot;`date`&gt; &quot; Tue Dec 22 11:26:58 UTC 2015&gt; <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0412\u044b \u0447\u0443\u0432\u0441\u0442\u0432\u0443\u0435\u0442\u0435 \u0441\u0435\u0431\u044f \u043f\u043e\u0434\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c, \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0446\u0432\u0435\u0442 \u0441\u0432\u043e\u0435\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438:  <\/p>\n<pre><code class=\"html\">Tue Dec 22 11:26:58 UTC 2015&gt; PS1=&quot;\\e[34m\\]u@\\h &quot; u@lw1777 <\/code><\/pre>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0446\u0432\u0435\u0442\u043e\u0432:  <\/p>\n<pre><code class=\"html\">30m: Black 31m: Red 32m: Green 33m: Yellow 34m: Blue 35m: Purple 36m: Cyan 7m: White <\/code><\/pre>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0446\u0432\u0435\u0442\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0435, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e:  <\/p>\n<pre><code class=\"html\">u@lw1777 PS1=`\\[\\e[0;31m\\]\\u\\[\\e[m\\] \\[\\e[1;35m\\]\\w\\[\\e[m\\]&gt; ` <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u201c\\[ \u0438 \\]\u201d \u0432\u043e\u043a\u0440\u0443\u0433 \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0445 \u043a\u043e\u0434\u043e\u0432. \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0448\u0440\u0438\u0444\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0412\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435, \u043a\u0430\u043a \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u0447\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0438\u0436\u0435:  <\/p>\n<pre><code class=\"html\">0=regular 0;31m 1=bold 1:35m 4=underline 4:32m <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0442\u0440\u044e\u043a \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0412\u0430\u0448\u0430 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u0443\u0433\u043b\u0435 \u043e\u043a\u043d\u0430 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0412\u0430\u0448\u0443 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443 &quot;&gt;&quot; \u0441 \u0442\u0430\u043a\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439:  <\/p>\n<pre><code class=\"html\">[root@lw1777 ~]# PS1=&quot;&gt; \\[\\033[s\\]\\[\\033[1;\\$((COLUMNS-4))f\\]\\$(date +%H:%M)\\[\\033[u\\]\\&quot; <\/code><\/pre>\n<p>  \u0418\u043b\u0438, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u0442\u0435, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043d\u044f \u043d\u0435\u0434\u0435\u043b\u0438:  <\/p>\n<pre><code class=\"html\">[root@lw1777 ~]# PS1=&quot;&gt; \\[\\033[s\\]\\[\\033[1;\\$((COLUMNS-8))f\\]\\$(date +%A)\\[\\033[u\\]&quot; <\/code><\/pre>\n<p>  \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 Unix, \u043d\u043e \u043e\u043d\u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0435\u0441\u043b\u0438 \u0412\u044b \u043d\u0435 \u0442\u043e\u0440\u043e\u043f\u0438\u0442\u0435\u0441\u044c \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438\u0445.               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/267143\/\"> http:\/\/habrahabr.ru\/post\/267143\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/443\/557\/e94\/443557e9461a4bf092e5d491cfbf7c3e.jpg\"\/><\/p>\n<p>  \u0425\u0432\u0430\u0442\u0438\u0442 \u201c#\u201d \u0438 \u201c$\u201d? \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/Bash\">bash<\/a> \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0446\u0432\u0435\u0442 \u0448\u0440\u0438\u0444\u0442\u0430 \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0412\u0430\u0448\u0443 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e \u0433\u0434\u0435 \u0412\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0432 \u043a\u0430\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0412\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>  \u0421\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u043e\u0433\u0430\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u043c\u0435\u043a, \u0447\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0435\u0441\u043b\u0438 \u0412\u044b \u0447\u0430\u0441\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435 \u0441\u0435\u0431\u044f \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 3-4 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044f \u043f\u043e \u043e\u043a\u043d\u0430\u043c, \u0447\u0442\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0435\u0449\u0438\u0435, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e\u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u043b\u0438 \u0435\u0441\u043b\u0438 \u0412\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u0440\u0430\u0437\u043d\u044b\u0445 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432. \u041d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c, \u0435\u0441\u043b\u0438 \u0412\u0430\u043c \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u0412\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435.<\/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-270939","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/270939","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=270939"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/270939\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=270939"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=270939"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=270939"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}