Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
UNIXãMacã使ç¨ãã¦ããã¦ã¼ã¶ã¼ãªãã°èª°ã§ãä¸åº¦ã¯ã·ã§ã«ã¹ã¯ãªãããä½æããçµé¨ãããã¨æãã¾ããã©ããªç°å¢ã§ã使ãåãããã¼ã¿ããªãã£ã®é«ããé åã§ãããããã°ã©ãã³ã°è¨èªã¨ãã¦ã¿ãã¨ç¬ç¹ãªé¨åãå¤ãããªãã¨ãªãè¦ææèãæã£ã¦ããæ¹ãå¤ãããããã¾ããã æ¬æ¥ç´¹ä»ãããBash Infinity Frameworkãã¯ãããªã·ã§ã«ã¹ã¯ãªããã®æ¦å¿µãå®å ¨ã«å¤ãã¦ãã¾ãBashç¨ã®ãã¬ã¼ã ã¯ã¼ã¯ã§ãã ã¢ã¸ã¥ã©ã¼ãã¤è»½éã§ãC#ãJavaãJavaScriptã¨ãã£ãä»ã®è¨èªã®ã³ã³ã»ãããåãå ¥ãããã©ã°ï¼ãã¬ã¤ã§å¿ è¦ãªæ©è½ã ãã追å ãã¦ãããç¹å¾´ãæã£ã¦ãã¾ãã 主ãªç¹å¾´ã¯ä»¥ä¸ã®éãã§ã: èªåã¨ã©ã¼ãã³ããªã³ã° ååä»ããã©ã¡ã¼ã¿($1ã$2ã§ã¯ãªãã¦) é åã¨ãããããã©ã¡ã¼ã¿ã¨ãã¦å¼ã渡ãã try-catchã®å®è£ ç¬èªä¾å¤ã®throw ãã¼ã¯ã¼ãã®ã¤ã³ãã¼ã åºåãæ¹åã
ç¡å¹ãªURLã§ãã ããã°ã©ã è¨å®ã®åæ å¾ ã¡ã§ããå¯è½æ§ãããã¾ãã ãã°ããæéãããã¦å度ã¢ã¯ã»ã¹ãã試ããã ããã
fossBytesã«8æ9æ¥(ç±³å½æé)ã«æ²è¼ãããè¨äºãTop 5 Highest Paying Programming Languages of 2016ãããPacktã1ä¸1000人以ä¸ã®ITãããã§ãã·ã§ãã«ã対象ã«ãã調æ»ããã¼ã¹ã¨ããã給ä¸æ¯æãã®é«ãããã°ã©ãã³ã°è¨èªã©ã³ãã³ã°2016å¹´çãç´¹ä»ããã ç´¹ä»ããã¦ãã給æã®é«ãããã°ã©ãã³ã°è¨èªã¯æ¬¡ã®ã¨ããã Bash 10ä¸ç±³ãã«(ç´1010ä¸å) Perl 9ä¸5000ç±³ãã«(ç´960ä¸å) Scala 9ä¸ç±³ãã«(ç´910ä¸å) SQL 6ä¸2000ç±³ãã«(ç´630ä¸å) Delphi 6ä¸ç±³ãã«(ç´610ä¸å) åè¨äºã§ã¯ãã»ãã«ã人æ°ã®é«ãããã°ã©ãã³ã°è¨èªã人æ°ã®é«ãWebéçºãã¬ã¼ã ã¯ã¼ã¯ãéçºè ã³ãã¥ããã£ãèå³ãæã£ã¦ããã¢ã¤ãã¢ã®ã©ã³ãã³ã°ãæ²è¼ããã¦ãããããããæ²è¼ããã¦ããã©ã³ãã³ã°ã®ããã5ã¯æ¬¡ã®
ã¯ããã« ãGitè£å®ããããªãããcommitãã©ã³ããééããããgit statusã1æ¥100åã¯ä½¿ãããããªããªãã«æå ±ã§ãã bashã®èª¬æã ãã«çµã£ã¦ãã¾ããzshï¼ãtcshï¼ãç¥ããªãåã§ããã ãããªãå®æå½¢ # ã¹ã¯ãªããèªã¿è¾¼ã¿ source $HOME/.git-completion.bash source $HOME/.git-prompt.sh # ããã³ããã«å種æ å ±ã表示 GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWUPSTREAM=1 GIT_PS1_SHOWUNTRACKEDFILES= GIT_PS1_SHOWSTASHSTATE=1 ############### ã¿ã¼ããã«ã®ã³ãã³ãåä»ç¶æ ã®è¡¨ç¤ºå¤æ´ # \u ã¦ã¼ã¶å # \h ãã¹ãå # \W ã«ã¬ã³ããã£ã¬ã¯ã㪠# \w ã«ã¬ã³ããã£ã¬ã¯ããªã®ãã¹ # \
bash ã«ã¯ glob ã¨ãããã®ãããã¾ããglob ã£ã¦ãªã«ãã£ã¦ãã人ã ls *.sh ã¨ããå±éãã bash ã®æ©è½ã§ããã£ã¦ããã¨åãããã¨æãã¾ãã ãã® glob ã®æ©è½ã£ã¦å¤ç¨ããã¾ãããã¾ãããã¥ã¢ã«ã¨ãèªãã 人ãããªãã¨æãã®ã§ãç°¡åã«ã¾ã¨ãã¦ã¿ã¾ãã 1. Pattern Matching Glob ã®ãã¿ã¼ã³ãããã³ã°ã«ä½¿ç¨ã§ããæåã®ãã¿ã¼ã³ã£ã¦ããã®ã¯ãé常ã次ã®æåã§ãã *: ä½ã«ã§ãããããã ?: ä»»æã®ä¸æåã«ããããã [...]: [ 㨠] ã®éã«è¨è¿°ãããä»»æã®æåã«ããããããããã¯ã¡ãã£ã¨ãããããã®ã§ãããã¡ãã£ã¨ã¾ã¨ãã¾ãã [...] [...] ã® ... ã«ã¯é常ã¨ãã¦æåã®éåãæå®ã§ãã¾ãããå¤å°è¡¨ç¾åã®ãããã®ãæå®ã§ãã¾ãã 次ã®ããã«ããã¤ãã³- ã§æå®ãããç¯å²ã®ã¿ã«ãããããããã§ãã¾ããã $ ls test
æè¿ã¡ã¤ã³ã®éçºç°å¢ã Windows 10 ã«ããã®ã§ãå ¥ããã½ããã¦ã§ã¢ã®ã¡ã¢ã MSYS2 https://msys2.github.io/ UNIXçãªã·ã§ã«ç°å¢ãã¿ã¼ããã«(mintty)ãã·ã§ã«(bash)ãããã±ã¼ã¸ããã¼ã¸ã£(pacman)ãæ¨æºã§å ¥ããã ãã§ä½¿ããããã«ãªããã·ã§ã«æä½ã¯ MYSY2 ä¸ã«å«ã¾ãã ã¿ã¼ããã« mintty ä¸ã§ bash ãåããã¦ãã®ä¸ã§ screen ãã git ãã ssh ããããããã MSYS2ã§å¿«é©ãªã¿ã¼ããã«çæ´» ã«ã¾ã¨ããã¦ããã®ã§ããã®ä»ããã¤ããã ãã¼ã ãã£ã¬ã¯ã㪠æ¨æºã 㨠C:\mysy64\home\ã¦ã¼ã¶å ã ããèªå㯠%USERPROFILE% (win ã®ã¦ã¼ã¶ãã£ã¬ã¯ããª)ã¨åä¸ã®ã¨ããããã¼ã ãã£ã¬ã¯ããªã¨ãã¦ä½¿ãããã®ã§ãç°å¢å¤æ° HOME ã %USERPROFILE% ã«æå®ããã(ç°å¢å¤
以åã«ãããããã¨Linuxã§ã³ãã³ãã®å®è¡å±¥æ´ããã°ã«è¨é²ããæ¹æ³ã«ã¤ãã¦æ¸ãã¦ãã®ã§ãã¾ã¨ãã¦ã¿ããã¨ã«ããã 1.ã·ã§ã«ã®historyãå©ç¨ãã ã¾ããåºæ¬ã¨ããã°åºæ¬ã ã·ã§ã«ã®historyæ©è½ã使ã£ã¦è¨é²ãã¦ããã¨ãããã®ã ãã ãããã©ã«ãã ã¨ãã¡ã¤ã«ã¸ã®æ¸ãåºããã»ãã·ã§ã³ã¯ãã¼ãºå¾ã§ãã¿ã¤ã ã¹ã¿ã³ããã¤ãã¦ãªãã®ã§ããã®ã¾ã¾ã§ã¯ä½¿ãã«ããã ã¾ããã³ãã³ãã®å®è¡ã¦ã¼ã¶ã権éãæã£ã¦ããã®ã§ããã¡ã¤ã«ãç´æ¥ç·¨éã§ããã®ããããªãããã 2.bashã®æ©è½ãç¨ãã bash 4.1以éã ã¨ãå®è¡ããã³ãã³ããsyslogã§è¨é²ããããã¨ãã§ããããã«ãªã£ã¦ããã ãã ãCentOSãUbuntuã ã¨ãã®ã¾ã¾ã§ã¯å©ç¨ãããã¨ã¯ã§ãããã³ã³ãã¤ã«ããªããå¿ è¦ãããã yumãapt-getã§ã¢ãããã¼ããã§ããªããªãã®ã§ãä½ãããã®èå¼±æ§ãè¦ã¤ããã¨ã³ã³ãã¤ã«ããªããå¿ è¦ãåºã¦
Shell Script Advent Calendar 2015 7æ¥ç®ã®è¨äºã§ãã Bashã®ã¡ãã£ã¨ããTipsã§ãã Bashã«éããªãããç¥ãã¾ããããæ¤è¨¼ç°å¢ãBashããããã¾ããã§ããã åé¡ Bash㧠$(command) ã¨æ¸ãã¨ãcommandããµãã·ã§ã«ã§å®è¡ããã stdoutï¼æ¨æºåºåï¼ãå¤æ°ã«æ ¼ç´ãããã¨ãã§ãã¾ãï¼ hoge_value=$(echo 'hoge') # hoge_value => "hoge" ãã ãstderrï¼æ¨æºã¨ã©ã¼åºåï¼ã¯ãã£ããã£ã§ãã¾ããã ãã¾ãstdoutã¨stderrã¸åºåãã100ãè¿ãé¢æ°ãããã¨ãã¾ãã out_err_and_exit() { echo "This is stdout" echo "This \\is \"tricky 'stdout" echo "This is stderr" >&2 ech
ã¯ããã« bash-completionãã¤ã³ã¹ãã¼ã«ãããã¨ã§ãsshãpingãªã©ã®ã³ãã³ãã§ãã¿ããã¼ã«ãããã¹ãåè£å®ãå¯è½ã«ãªãã¾ãã ããããèªä½ã®ãã¹ãåè£å®ã« ç½®ãæãããä¾ã¯æ§ã ããã¾ããããèªä½ã®ãã¹ãåè£å®ã 追å ãã ãæé ã®ä¾ããªããªãè¦ã¤ãããªãã®ã§ãç§ã®å®è£ ä¾ãTipsã¨ãã¦ã¾ã¨ãã¾ããã 以ä¸ã¯ãbash-completionã®version 1.3ãæ¤è¨¼ç°å¢ã¨ãã¦è¨è¼ãã¦ãã¾ãã ã¾ããç§èªèº«bash-completionè¨å®ãåãã¦æ¸ããã®ã§ããä½æ³ãç¡è¦ãã¦ããããããã¾ããããæ¿ç¥ãã ããã (2016/01/19追è¨) æ¬æé ã«å¾ãã¨ãè£å®æ©è½ã¯ã·ã¹ãã å ±éè¨å®ã¨ãã¦è¨å®ããã¾ããå人è¨å®ãä½æããéã«ã¯å¥ã®æé ãåç §ãã¦ãã ããã bash-completionå°å ¥æ¹æ³ 以ä¸ãåèã«ãªãã¾ãã ã¶ã£ã¡ãããyum install bash-com
@hirose31 ããããã·ã§ã«ã¹ã¯ãªããã§ããã£ã件âãåãã¹ãããªåé¿æ¹æ³ãã§ãé¡ãåºããã¦ãã¦ãããã«åçãã¦ã¿ã¾ããã ãã®å 容ã¯ãªã³ã¯å ãè¦ã¦ãããã¨ãã¦ãåçã®ä¸ã§ä½¿ã£ãbashã®ããã»ã¹ç½®æã«ã¤ãã¦æ¸ãããè¨äºããã¾ãè¦ãªãã®ã§ãåçã§ä½¿ã£ãããã»ã¹ç½®æã®ãã¨ãã¨ã³ããªã«ãã¦ã¿ããã¨æãã¾ãã æåã«æ³¨æç¹ã§ãããããã»ã¹ç½®æã®æ©è½ã¯ãbashãzsh*1ã®æ©è½ã§POSIXäºæã®æ©è½ã§ã¯ããã¾ããããã®ããã使ç¨æã«ã¯ã対å¿ãã¦ããªãã·ã§ã«ã§ã¯ä½¿ãã¾ããããbashã§ä½¿ãå ´åã /bin/sh ã§ã¯ãªã /bin/bash ãæ示çã«æå®ããå¿ è¦ãããã¾ãããã¨ãã°ãããã»ã¹ç½®æã使ã£ãã¹ã¯ãªãããscript.shãã«å¯¾ãã¦"$ bash script.sh" ã¨ããã³ãã³ãã¯æåãã¾ããã"$ sh script.sh" ã¨ããã³ãã³ãã¯å¤±æãã¾ãããã®è¾ºãã®éãã¯ã/
Shell Script Advent Calendar 2015 4æ¥ç® ã®æ稿ã§ãã 以åããèªåç¨ã«ã¡ã¢ãã¦ãããã®ãæåèµ·ãããã¾ããã ã¯ããã« ä»äºã§ã·ã§ã«ã使ãå§ãã¦3å¹´ãããçµã¡ã¾ããã éä¸ãpython ã ruby ã§ã¹ã¯ãªããä½ã£ãããã¡ãã£ã¨ zsh ã«æµ®æ°ããããã¾ãããããªãã ããã ã§ä»ã Bash ã使ããã¨ãå¤ãã§ãã ãã®3å¹´éãã¹ã¼ãã¼ã·ã§ã«è¸äºº(@ebanãã)ã«ãææé ããããGolfãããï¼@ebanã®å½±é¿ï¼ãã·ã§ã«è¸åå¼·ä¼ã«åå ãããï¼@ebanã®å½±é¿ï¼ãã¦ãã¾ããã ãããª3å¹´éã®ã¾ã¨ãã¨ãã¦ãã·ã§ã«ã¹ã¯ãªããåãã¾ãã¦ã ã£ã3å¹´åã®ç§ã«åããTipséãæ¸ãã¦ã¿ã¾ããã è¶£æ¨ åé ç®ãã¨ã«ãã¾ãåå¿è ï¼éå»ã®ç§ããã£ã¦ãï¼ããããå®è£ ãä¾ç¤ºãã¦ããã®æ¬¡ã«ãããè¯ãããªå®è£ ãä¾ç¤ºããæ§æã¨ãã¦ãã¾ãã å®è¡ç°å¢ OS Mac OS X Yos
Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? # .bashrc ############################################ # å ±ébashrcã®èªã¿è¾¼ã¿ ############################################ # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi ############################################ # PSè¨å® ##############################
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}