{"id":29,"date":"2008-11-18T17:22:37","date_gmt":"2008-11-18T08:22:37","guid":{"rendered":"http:\/\/www.kaz.bz\/wp\/2008-11-18_228\/"},"modified":"2014-06-23T19:37:57","modified_gmt":"2014-06-23T10:37:57","slug":"%e8%87%aa%e5%88%86%e7%94%a8bash%e3%83%97%e3%83%ad%e3%83%b3%e3%83%97%e3%83%88","status":"publish","type":"post","link":"https:\/\/wp.kaz.bz\/tech\/2008\/11\/18\/29.html","title":{"rendered":"\u81ea\u5206\u7528bash\u30d7\u30ed\u30f3\u30d7\u30c8"},"content":{"rendered":"<p>.bash_profile\u3042\u305f\u308a\u306b<\/p>\n<p>export PS1=\"[\\e[0;31m&#93;\\d \\t\\e[0m][\\e[1;32m\\u\\e[0m@\\h \\w]\\$\"<\/p>\n<p>[\u8ffd\u8a18 date=\"2014.06.23.\"]<br \/>\n\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u5f8c\u306b\u5b9f\u884c\u3055\u308c\u308b\u51e6\u7406\uff08 PROMPT_COMMAND \uff09\u3092\u5229\u7528\u3057\u3066\u8868\u793a\u8272\u3092\u5909\u3048\u3064\u3064\u8907\u6570\u884c\u3067\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306a\u3069\u3092\u8a73\u7d30\u5316\u3057\u305f\u3082\u306e\u3002<\/p>\n<pre class=\"brush:shell\">\nmy_prompt_command()\n{\n  if [ $? -eq 0 ]\n  then\n    RET=0\n  else\n    RET=1\n  fi\n  RET_CLR=${RET}\\;31m\n}\n\nPRM_CLR=0\\;31m\n\nexport PROMPT_COMMAND=my_prompt_command\nexport PS1=\"\\[\\e[\\${RET_CLR}\\][ret: \\$?] \\[\\e[\\${PRM_CLR}\\]($(date +'%Y\/%m\/%d') \\t) [${debian_chroot:+($debian_chroot)}\\u@\\h:$(pwd)][\\w]\\n(\\u)\\\\$>\\[\\e[m\\] \"\n<\/pre>\n<p>[\/\u8ffd\u8a18]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>.bash_profile\u3042\u305f\u308a\u306b export PS1=\"[\\e[0;31m&#93;\\d \\t\\e[0m][\\e[1;32m\\u\\e[0m@\\h \\w]\\$\" [\u8ffd\u8a18 date=\"2014.06.23.\"] \u30b3\u30de\u30f3\u30c9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[8],"tags":[83],"class_list":["post-29","post","type-post","status-publish","format-standard","hentry","category-shellscript","tag-lin"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2035,"url":"https:\/\/wp.kaz.bz\/tech\/2015\/05\/09\/2035.html","url_meta":{"origin":29,"position":0},"title":"CentOS 7 \u3067 niltalk + httpd \u3002","author":"kaz. Suenaga","date":"2015\/05\/09","format":false,"excerpt":"\u30e1\u30e2\u3002 MOONGIFT\u3055\u3093\u306e\u8a18\u4e8b http:\/\/moongift.jp\/2015\/05\/nilta\u2026","rel":"","context":"\u305d\u306e\u4ed6","block_context":{"text":"\u305d\u306e\u4ed6","link":"https:\/\/wp.kaz.bz\/tech\/category\/servers\/%e3%81%9d%e3%81%ae%e4%bb%96"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":94,"url":"https:\/\/wp.kaz.bz\/tech\/2006\/06\/12\/94.html","url_meta":{"origin":29,"position":1},"title":"PostgreSQL \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30b9\u30af\u30ea\u30d7\u30c8","author":"kaz. Suenaga","date":"2006\/06\/12","format":false,"excerpt":"#! \/bin\/sh PGSQL_VER=postgresql-7.4.6 PGSQL_DIR=\/u\u2026","rel":"","context":"PostgreSQL","block_context":{"text":"PostgreSQL","link":"https:\/\/wp.kaz.bz\/tech\/category\/servers\/db\/postgresql"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2579,"url":"https:\/\/wp.kaz.bz\/tech\/2020\/09\/28\/2579.html","url_meta":{"origin":29,"position":2},"title":"\u3055\u304f\u3089\u306eVPS\u3067CentOS8\u3092\u69cb\u7bc9\u3059\u308b\u969b\u306e\u30e1\u30e2\u3002","author":"kaz. Suenaga","date":"2020\/09\/28","format":false,"excerpt":"\u3055\u304f\u3089\u306eVPS\u4ee5\u5916\u3067\u3082 CentOS8 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u53c2\u8003\u306b\u306a\u308b\u3068\u601d\u3046\u306e\u3067\u30e1\u30e2\u3002 \u601d\u3044\u51fa\u3057\u305f\u3088\u3046\u306b\u2026","rel":"","context":"CentOS","block_context":{"text":"CentOS","link":"https:\/\/wp.kaz.bz\/tech\/category\/lin\/centos"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":634,"url":"https:\/\/wp.kaz.bz\/tech\/2011\/02\/03\/634.html","url_meta":{"origin":29,"position":3},"title":"daemontools + ucspi-tcp + djbdns(dnscache) + netqmail =","author":"kaz. Suenaga","date":"2011\/02\/03","format":false,"excerpt":"\u4e00\u6c17\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u6c7a\u3081\u3046\u3061\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002 \/usr\/local\/src\/djb \u3068\u304b\u306b ins\u2026","rel":"","context":"DJB","block_context":{"text":"DJB","link":"https:\/\/wp.kaz.bz\/tech\/category\/servers\/djb"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1041,"url":"https:\/\/wp.kaz.bz\/tech\/2011\/11\/07\/1041.html","url_meta":{"origin":29,"position":4},"title":"\u6539\uff1aCSR\u4f5c\u6210\u65b9\u6cd5\uff0b\u81ea\u5df1\u7f72\u540d\uff08\u30aa\u30ec\u30aa\u30ec\u8a3c\u660e\u66f8\uff09\u3001\u6c7a\u3081\u6253\u3061\u30b9\u30af\u30ea\u30d7\u30c8\u7248\u3002","author":"kaz. Suenaga","date":"2011\/11\/07","format":false,"excerpt":"\u904e\u53bb\u306e\u8a18\u4e8b CSR\u4f5c\u6210\u65b9\u6cd5\uff0b\u81ea\u5df1\u7f72\u540d\uff08\u30aa\u30ec\u30aa\u30ec\u8a3c\u660e\u66f8\uff09 \u3068\u307b\u307c\u540c\u3058\u5185\u5bb9\u306e\u518d\u6574\u7406\u3067\u3059\u3002 \u3044\u3064\u3082\u306e\u6c7a\u3081\u6253\u2026","rel":"","context":"OpenSSL","block_context":{"text":"OpenSSL","link":"https:\/\/wp.kaz.bz\/tech\/category\/web\/openssl"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":76,"url":"https:\/\/wp.kaz.bz\/tech\/2006\/12\/29\/76.html","url_meta":{"origin":29,"position":5},"title":"httpd.conf\u306eVirtualHost \u96db\u5f62\u3002\uff08SSL\u7248\uff09","author":"kaz. Suenaga","date":"2006\/12\/29","format":false,"excerpt":"# ------------------------------------------------\u2026","rel":"","context":"Apache","block_context":{"text":"Apache","link":"https:\/\/wp.kaz.bz\/tech\/category\/servers\/apache"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":0,"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}