Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
ã·ã§ã«ã¹ã¯ãªããã®ä¸ã§ãã¹ãã¼ã¹åºåããããã¯ã¿ãåºåãã®ã¬ã³ã¼ããæ±ããã¨ãããããã¨æãã¾ãã ãã¨ãã°ãååã®ã¨ã³ããªãAWS CLIã¨jqã使ã£ã¦ãAWSã®ELBããªã¥ã¼ã ãã¢ã¿ããããã¦ããEC2ã¤ã³ã¹ã¿ã³ã¹åãåºåããã¯ã³ã©ã¤ãã¼ãæ¸ãã - åå å·¥å ´æ¥èªãã®ã¹ã¯ãªããã®åºåã¯ä»¥ä¸ã®ããã«ãªãã¾ãã i-ec56a9f5 vol-07d00601 servername i-ec56a9f5 vol-8f550991 servername ãã®ãããªã¬ã³ã¼ãã®ç¹å®ã®åãåãåºãã¦ãå¦çããéã«ã©ãããã®ãå¹ççããã¨ããã®ããã®ã¨ã³ããªã®ãé¡ã§ãã é常ã«å¤ã話é¡ãªã®ã§ãæããã·ã§ã«ã¹ã¯ãªãããæ¸ãã¦ãã人ã«ã¯èªæãªè©±ã§ã¯ããã¾ãããæè¿ãã·ã§ã«ã®æ¨æºæ©è½ã®è©±ãèãæ©ä¼ããªãã失ããã¤ã¤ããæè¡ã«ãªã£ã¦ãã¦ããæ°ããã¦ããã®ã§ãæ¹ãã¦ç¢ºèªã¨ãããã¨ã§ã ä¾ã¨ãã¦æããã¬ã³ã¼ããã
ã©ãã¡ã¬ãã§ããæè¿ã§ã¯ãããããä½æ¥ãã¯ãããããã«ãã¾ãé»ãç»é¢ãéãç¨åº¦ã«ãªã£ãç§ã§ãããããªç§ãæè¿ããããã¦ããã£ã¦ä¾¿å©ã ã£ãã·ã§ã«ãfishã·ã§ã«ã§ãã fish shell ã·ã§ã«ã£ã¦ãªãã ãï¼ã¨ããæ¹ã«ã¯Wikipediaãã©ãã ã·ã§ã« ã¤ã¾ãã¯ãé»ãç»é¢ãåããã¨ãã®ã¤ã³ã¿ã¼ãã§ã¤ã¹ã§ãããåããé£ãã§ããããããããã¨ã§ãããããã©ãããå ·åã«fashã·ã§ã«ã便å©ãªã®ãããä¼ããã¦ããã¾ãããã ã¤ã³ã¹ãã¼ã«ãç°¡å homebrewã§ã¤ã³ã¹ãã¼ã«ã§ããã®ã§ç°¡åã§ããã OSXã§fish shellã使ã fish-shell ã¯ããã¦ã¿ã ã»ã¨ãã©è¨å®ããªãã¦ãã .bashrc ã¨ã .bash_profile ã¨ããããã£ãã®ãã»ã¨ãã©è§¦ããªãã¦ããã§ãã å¾è¿°ãã¾ããç§ã追å ããã®ã¯ï¼ã¤ãããã楽ã¡ãã§ããã ç§é¸ãªåè£ææ¡ â» ç»åã¯å ¬å¼ãµã¤ãããæµç¨ ãã£ã¬
æãã¾ãã¦ããã§ã¨ããããã¾ãï¼ è¨å®ãã¡ã¤ã«ã®å¤§æé¤ãå ¼ãã¦ãèªå® Macã®ç°å¢ã»ããã¢ãããAnsibleã§è¡ãããã«ãã¦ã¿ã¾ããã joe-re/dotfiles · GitHub Ansibleã«ããçµç·¯ 2å°ã®Macã®ç°å¢ãæããã æ¨å¹´iMac5kãã£ã¹ãã¬ã¤ã¢ãã«ãè³¼å ¥ããã ããã«ãã£ã¦ä»ã¾ã§ã¡ã¤ã³ã§ä½¿ç¨ãã¦ããMacBookAirã¯å¤åºç¨ã«ãã¦ã2å°ã§éç¨ãã¦ããã ãããªãã¨ã©ããã£ã¦ç°å¢ãæãããããªã¼ãã£ã¦æ©ã¿ãçºçããã ãªãã¹ãå¤åºæãç°å¢ã¯å¤ããã«éçºã§ããããã«ãããã Ansibleã«è³ãã¾ã§ å½åã¯Boxen使ã£ã¦ãã Boxenã¯Puppetã§Macã®ç°å¢æ§ç¯ãèªååãã¦ããããã¼ã«ã Puppetã®DSLãè¦ããªããã°ãããªãã¨ãããã¼ãã«ã¯ãããã®ã®ã ããªãç´°ããã¨ããã¾ã§è¨å®ã§ãã¦é常ã«é«æ©è½ã ã ãã©ãã¼ã ãªãã¾ã ãããå人ã§ä½¿ãã«ã¯ãªã¼ãã¼ã¹
ã·ã§ã«ã¹ã¯ãªããå ¥éã¨ãã¦, åºæ¬çãªæ¸ãæ¹ãã¾ã¨ãã¾ãã. é·ãã§ãã, 1ãã¼ã¸ã«ã¾ã¨ãã¦ã¿ã¾ãã. è¯ãã£ããç®æ¬¡ãåèã«ãã¦ã覧ã«ãªã£ã¦ä¸ãã. ç®æ¬¡ ã·ã§ã«ã¹ã¯ãªããã¨ã¯ ä½ãæ¹, å®è¡ã®ä»æ¹ ã³ã¡ã³ã ã¦ã¼ã¶ã¼ããã®ãã¼ãã¼ãå ¥åãåãä»ãã å¤æ° é常ã®å¤æ° ç¹å¥ãªå¤æ° æ¼ç®å æ°å¤è¨ç®æ¼ç®å æ¯è¼æ¼ç®å ã³ãã³ããç¹ããæ¼ç®å æ¡ä»¶æã«ä½¿ããæ¯è¼æ¼ç®å æ¡ä»¶æ å¶å¾¡æ§æ(åå²) ifæ caseæ å¶å¾¡æ§æ(ã«ã¼ã) foræ whileæ untilæ selectæ æååå¦ç æååç½®æ åé¤ è¤æ°è¡ã®ããã¹ãã®åºå(ãã¢ããã¥ã¡ã³ã) é¢æ° ã·ã§ã«ã¹ã¯ãªããã¨ã¯ ã·ã§ã«ã¹ã¯ãªããã¨ã¯, ã·ã§ã«ã®åä½ãã¾ã¨ãã¦è¨è¿°ããã¹ã¯ãªããã®ãã¨ã§ã. 決ããããææ³ã«ãããã£ã¦å¦çãè¨è¿°ãããã¨ã«ãã£ã¦, ã·ã§ã«ã§ã®å¦çãã¾ã¨ãã¦è¡ã£ãã, ä½æ¥ãèªååã§ããããã¾ã(ä¾ è¤æ°
編注1ï¼ãã·ã§ã«è¸ãã¨ã¯ãUNIXã·ã§ã«ï¼ä¸»ã«bashï¼ã®ã¯ã³ã©ã¤ãã¼ãé§ä½¿ãã¦æååå å·¥ãèªç±èªå¨ã«æããã¨ã§ããã¾ãããã®ãããªè½åããã¤äººãã·ã§ã«è¸äººã¨å¼ã³ã¾ãã ãè¡ãï¼ãã¬ã³ã¼ãã ããã©ã«ãã§AWKã¯ãè¡ãããã¬ã³ã¼ããã¨ãããã®ã¨ãã¦æ±ãã¾ããæ£ããã¯çµè¾¼å¤æ°RS (Record Separater) ã§åºåããããã®ãã¬ã³ã¼ãã¨å¼ã³ã¾ãããããã©ã«ãã§ã¯ããã®çµè¾¼å¤æ°RSã¯æ¹è¡ã«ãªããããè¡ãã¬ã³ã¼ããã®ãã®ã«ãªãã¾ããã¾ãããã®ã¬ã³ã¼ãåä½ã®åå²ã¯ãã¢ã¯ã·ã§ã³ã§ããã¹ããã¡ã¤ã«ãèªã¿è¾¼ãã¨å¿ ãè¡ããããã®ã¨ãªã£ã¦ãããããã¦ã¼ã¶ã¼ãç¹å¥ã«åå²å¦çãããªãã¦ãã¬ã³ã¼ãåä½ã§æ±ã£ã¦ããããã¨ã¦ã便å©ãªä»çµã¿ã§ãã ç¹æ®ãªãã®ã¨ãã¦ã段è½åä½ã§èªã¿è¾¼ãããã«çµè¾¼å¤æ°RSã«ç©ºæååãä»£å ¥ãããã®ããGNU AWK編注2ã§ã¯ãã¡ã¤ã«å ¨ä½ãã²ã¨ã¤ã®ã¬ã³ã¼ãã¨ãã¦èªã¿è¾¼ãææ³ãçµè¾¼å¤æ°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}