RedJini Blog
http://blog.redjini.com/
2024-03-19T10:17:15+09:00
Textcube 1.9.3 : poco a poco
[shell script] bash read command
나그네
http://blog.redjini.com/306
2017-07-03T19:37:59+09:00
2014-02-11T18:58:56+09:00
참고 : http://wiki.redjini.com/linux/script 옵션 -n number : number 수만큼의 문자를 입력받음 -p string : 프로프트에 string 문자열 출력 -a : 입력을 Array형태로 저장 -s : 입력을 프로프트에 출력하지 않음 -d char : 입력이 char 이면 read 명령을 종료함. shell script 내에서 문자열을 array에 저장하기 [code bash]#!/bin/shVMSTATLO...
<!-- ACEPRO -->
<div class='google_ad_line_top' id='google_ad_line_top'></div>
<div class='google_ad' id='google_ad'>
<script type='text/javascript'>
<!--
google_ad_client = 'ca-pub-8164287241783066';
/* 블로그 468*60 */
google_ad_slot = '6132571865';
google_ad_width = 468;
google_ad_height= 60;
//-->
</script>
<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>
</div>
<div class='google_ad_line_bottom' id='google_ad_line_bottom'></div>
<div class="scposts">
<h4>"<a href="http://blog.redjini.com/category/2">프로그래밍</a> / <a href="http://blog.redjini.com/category/12">Linux & Shell Script</a>" 분류의 다른 글</h4>
<table>
<tr><td><a href="http://blog.redjini.com/301">[linux] shell command 로그 남기기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/300">[linux] Linux Console에서 BEEP 사운드 끄기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/296">[shell] netstat</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/22</td></tr>
<tr><td><a href="http://blog.redjini.com/282">[shell script] 배열(Array) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/10</td></tr>
<tr><td><a href="http://blog.redjini.com/281">[shell script] 함수(Function) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/09</td></tr>
<tr><td><a href="http://blog.redjini.com/273">[linux] 메모리</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/12/17</td></tr>
<tr><td><a href="http://blog.redjini.com/263">[shell script] Here Documents</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/26</td></tr>
<tr><td><a href="http://blog.redjini.com/262">[shell script] directory exists check</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/20</td></tr>
<tr><td><a href="http://blog.redjini.com/258">[shell script] 실행 경로 구하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/10/24</td></tr>
<tr><td><a href="http://blog.redjini.com/240">[shell] yum 장애 조치</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2009/04/21</td></tr>
</table></div><p><strong><a href="http://blog.redjini.com/306">글 전체보기</a></strong></p>
[linux] shell command 로그 남기기
나그네
http://blog.redjini.com/301
2014-01-27T15:52:11+09:00
2014-01-27T13:50:16+09:00
Step 1: /etc/bashrc 파일 마지막 라인에 다음 사항 추가 export PROMPT_COMMAND='RETRN_VAL=$?;logger -p local6.debug "[$(whoami)][$PWD][$$]: $(history 1 | sed "s/^[ ]*[0-9]\+[ ]*//" ) [$RETRN_VAL]"' Step 2: /etc/syslog.config 파일에 다음사항 추가 local6.* /var/log/cmdlog.log sys...
<!-- ACEPRO -->
<div class='google_ad_line_top' id='google_ad_line_top'></div>
<div class='google_ad' id='google_ad'>
<script type='text/javascript'>
<!--
google_ad_client = 'ca-pub-8164287241783066';
/* 블로그 468*60 */
google_ad_slot = '6132571865';
google_ad_width = 468;
google_ad_height= 60;
//-->
</script>
<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>
</div>
<div class='google_ad_line_bottom' id='google_ad_line_bottom'></div>
<div class="scposts">
<h4>"<a href="http://blog.redjini.com/category/2">프로그래밍</a> / <a href="http://blog.redjini.com/category/12">Linux & Shell Script</a>" 분류의 다른 글</h4>
<table>
<tr><td><a href="http://blog.redjini.com/306">[shell script] bash read command</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/02/11</td></tr>
<tr><td><a href="http://blog.redjini.com/300">[linux] Linux Console에서 BEEP 사운드 끄기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/296">[shell] netstat</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/22</td></tr>
<tr><td><a href="http://blog.redjini.com/282">[shell script] 배열(Array) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/10</td></tr>
<tr><td><a href="http://blog.redjini.com/281">[shell script] 함수(Function) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/09</td></tr>
<tr><td><a href="http://blog.redjini.com/273">[linux] 메모리</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/12/17</td></tr>
<tr><td><a href="http://blog.redjini.com/263">[shell script] Here Documents</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/26</td></tr>
<tr><td><a href="http://blog.redjini.com/262">[shell script] directory exists check</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/20</td></tr>
<tr><td><a href="http://blog.redjini.com/258">[shell script] 실행 경로 구하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/10/24</td></tr>
<tr><td><a href="http://blog.redjini.com/240">[shell] yum 장애 조치</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2009/04/21</td></tr>
</table></div><p><strong><a href="http://blog.redjini.com/301">글 전체보기</a></strong></p>
[linux] Linux Console에서 BEEP 사운드 끄기
나그네
http://blog.redjini.com/300
2014-01-27T11:59:04+09:00
2014-01-27T11:56:34+09:00
Linux 콘솔창에서 키입력시 나는 비프음(beep) 끄기. [root@localhost ~]# vi /etc/inputrc # do not bell on tab-completionset bell-style none
<!-- ACEPRO -->
<div class='google_ad_line_top' id='google_ad_line_top'></div>
<div class='google_ad' id='google_ad'>
<script type='text/javascript'>
<!--
google_ad_client = 'ca-pub-8164287241783066';
/* 블로그 468*60 */
google_ad_slot = '6132571865';
google_ad_width = 468;
google_ad_height= 60;
//-->
</script>
<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>
</div>
<div class='google_ad_line_bottom' id='google_ad_line_bottom'></div>
<div class="scposts">
<h4>"<a href="http://blog.redjini.com/category/2">프로그래밍</a> / <a href="http://blog.redjini.com/category/12">Linux & Shell Script</a>" 분류의 다른 글</h4>
<table>
<tr><td><a href="http://blog.redjini.com/306">[shell script] bash read command</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/02/11</td></tr>
<tr><td><a href="http://blog.redjini.com/301">[linux] shell command 로그 남기기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/296">[shell] netstat</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/22</td></tr>
<tr><td><a href="http://blog.redjini.com/282">[shell script] 배열(Array) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/10</td></tr>
<tr><td><a href="http://blog.redjini.com/281">[shell script] 함수(Function) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/09</td></tr>
<tr><td><a href="http://blog.redjini.com/273">[linux] 메모리</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/12/17</td></tr>
<tr><td><a href="http://blog.redjini.com/263">[shell script] Here Documents</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/26</td></tr>
<tr><td><a href="http://blog.redjini.com/262">[shell script] directory exists check</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/20</td></tr>
<tr><td><a href="http://blog.redjini.com/258">[shell script] 실행 경로 구하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/10/24</td></tr>
<tr><td><a href="http://blog.redjini.com/240">[shell] yum 장애 조치</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2009/04/21</td></tr>
</table></div><p><strong><a href="http://blog.redjini.com/300">글 전체보기</a></strong></p>
[shell] netstat
나그네
http://blog.redjini.com/296
2014-01-23T18:50:31+09:00
2014-01-22T00:00:06+09:00
usage: netstat [-veenNcCF] [<Af>] -r netstat {-V|--version|-h|--help} netstat [-vnNcaeol] [<Socket> ...] netstat { [-veenNac] -I[<Iface>] | [-veenNac] -i | [-cnNe] -M | -s } [delay] -r, --route display routing table -I, --interfaces=[...
<!-- ACEPRO -->
<div class='google_ad_line_top' id='google_ad_line_top'></div>
<div class='google_ad' id='google_ad'>
<script type='text/javascript'>
<!--
google_ad_client = 'ca-pub-8164287241783066';
/* 블로그 468*60 */
google_ad_slot = '6132571865';
google_ad_width = 468;
google_ad_height= 60;
//-->
</script>
<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>
</div>
<div class='google_ad_line_bottom' id='google_ad_line_bottom'></div>
<div class="scposts">
<h4>"<a href="http://blog.redjini.com/category/2">프로그래밍</a> / <a href="http://blog.redjini.com/category/12">Linux & Shell Script</a>" 분류의 다른 글</h4>
<table>
<tr><td><a href="http://blog.redjini.com/306">[shell script] bash read command</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/02/11</td></tr>
<tr><td><a href="http://blog.redjini.com/301">[linux] shell command 로그 남기기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/300">[linux] Linux Console에서 BEEP 사운드 끄기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/282">[shell script] 배열(Array) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/10</td></tr>
<tr><td><a href="http://blog.redjini.com/281">[shell script] 함수(Function) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/09</td></tr>
<tr><td><a href="http://blog.redjini.com/273">[linux] 메모리</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/12/17</td></tr>
<tr><td><a href="http://blog.redjini.com/263">[shell script] Here Documents</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/26</td></tr>
<tr><td><a href="http://blog.redjini.com/262">[shell script] directory exists check</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/20</td></tr>
<tr><td><a href="http://blog.redjini.com/258">[shell script] 실행 경로 구하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/10/24</td></tr>
<tr><td><a href="http://blog.redjini.com/240">[shell] yum 장애 조치</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2009/04/21</td></tr>
</table></div><p><strong><a href="http://blog.redjini.com/296">글 전체보기</a></strong></p>
[shell script] 배열(Array) 사용하기
나그네
http://blog.redjini.com/282
2017-07-03T19:52:50+09:00
2014-01-10T19:36:13+09:00
참고 : 스크립트 > 배열" href="http://wiki.redjini.com/linux/script">http://wiki.redjini.com/linux/script 배열(Array) : 선언하기 <pre name="CODE" class="brush:bash">array_name_1=("value 1" "value 2" "value 3")array_name_2=(1 2 3)</pre> 배열(Array) : 참조하기 [code bash]array_name=("value 1" "valu...
<!-- ACEPRO -->
<div class='google_ad_line_top' id='google_ad_line_top'></div>
<div class='google_ad' id='google_ad'>
<script type='text/javascript'>
<!--
google_ad_client = 'ca-pub-8164287241783066';
/* 블로그 468*60 */
google_ad_slot = '6132571865';
google_ad_width = 468;
google_ad_height= 60;
//-->
</script>
<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>
</div>
<div class='google_ad_line_bottom' id='google_ad_line_bottom'></div>
<div class="scposts">
<h4>"<a href="http://blog.redjini.com/category/2">프로그래밍</a> / <a href="http://blog.redjini.com/category/12">Linux & Shell Script</a>" 분류의 다른 글</h4>
<table>
<tr><td><a href="http://blog.redjini.com/306">[shell script] bash read command</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/02/11</td></tr>
<tr><td><a href="http://blog.redjini.com/301">[linux] shell command 로그 남기기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/300">[linux] Linux Console에서 BEEP 사운드 끄기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/296">[shell] netstat</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/22</td></tr>
<tr><td><a href="http://blog.redjini.com/281">[shell script] 함수(Function) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/09</td></tr>
<tr><td><a href="http://blog.redjini.com/273">[linux] 메모리</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/12/17</td></tr>
<tr><td><a href="http://blog.redjini.com/263">[shell script] Here Documents</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/26</td></tr>
<tr><td><a href="http://blog.redjini.com/262">[shell script] directory exists check</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/20</td></tr>
<tr><td><a href="http://blog.redjini.com/258">[shell script] 실행 경로 구하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/10/24</td></tr>
<tr><td><a href="http://blog.redjini.com/240">[shell] yum 장애 조치</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2009/04/21</td></tr>
</table></div><p><strong><a href="http://blog.redjini.com/282">글 전체보기</a></strong></p>
[shell script] 함수(Function) 사용하기
나그네
http://blog.redjini.com/281
2017-07-03T19:37:02+09:00
2014-01-09T18:23:02+09:00
참고 : http://wiki.redjini.com/linux/script 사용법 <pre name="CODE" class="brush:bash">function name(){ shell command}</pre> 예제 <pre name="CODE" class="brush:bash">function my_function(){ echo "my function"}my_function</pre> 지역변수 (Local variables) [code bash]value=1234;function my_function(){ local value...
<!-- ACEPRO -->
<div class='google_ad_line_top' id='google_ad_line_top'></div>
<div class='google_ad' id='google_ad'>
<script type='text/javascript'>
<!--
google_ad_client = 'ca-pub-8164287241783066';
/* 블로그 468*60 */
google_ad_slot = '6132571865';
google_ad_width = 468;
google_ad_height= 60;
//-->
</script>
<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>
</div>
<div class='google_ad_line_bottom' id='google_ad_line_bottom'></div>
<div class="scposts">
<h4>"<a href="http://blog.redjini.com/category/2">프로그래밍</a> / <a href="http://blog.redjini.com/category/12">Linux & Shell Script</a>" 분류의 다른 글</h4>
<table>
<tr><td><a href="http://blog.redjini.com/306">[shell script] bash read command</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/02/11</td></tr>
<tr><td><a href="http://blog.redjini.com/301">[linux] shell command 로그 남기기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/300">[linux] Linux Console에서 BEEP 사운드 끄기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/296">[shell] netstat</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/22</td></tr>
<tr><td><a href="http://blog.redjini.com/282">[shell script] 배열(Array) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/10</td></tr>
<tr><td><a href="http://blog.redjini.com/273">[linux] 메모리</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/12/17</td></tr>
<tr><td><a href="http://blog.redjini.com/263">[shell script] Here Documents</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/26</td></tr>
<tr><td><a href="http://blog.redjini.com/262">[shell script] directory exists check</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/20</td></tr>
<tr><td><a href="http://blog.redjini.com/258">[shell script] 실행 경로 구하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/10/24</td></tr>
<tr><td><a href="http://blog.redjini.com/240">[shell] yum 장애 조치</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2009/04/21</td></tr>
</table></div><p><strong><a href="http://blog.redjini.com/281">글 전체보기</a></strong></p>
[linux] 메모리
나그네
http://blog.redjini.com/273
2013-12-30T12:42:49+09:00
2013-12-17T14:50:49+09:00
Linux에서 사용중인 실제 사용중인 메모리 구하기 설명 Linux "free" 실행 결과 [root@redjini script]# free -m total used free shared buffers cachedMem: 1010 817 193 0 121 115-/+ buffers/cache: 579 431Swap: 2000 66 1933 실제 Free Memory : free(193 MB) + buffers(121 MB) + cached(115 ...
<!-- ACEPRO -->
<div class='google_ad_line_top' id='google_ad_line_top'></div>
<div class='google_ad' id='google_ad'>
<script type='text/javascript'>
<!--
google_ad_client = 'ca-pub-8164287241783066';
/* 블로그 468*60 */
google_ad_slot = '6132571865';
google_ad_width = 468;
google_ad_height= 60;
//-->
</script>
<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>
</div>
<div class='google_ad_line_bottom' id='google_ad_line_bottom'></div>
<div class="scposts">
<h4>"<a href="http://blog.redjini.com/category/2">프로그래밍</a> / <a href="http://blog.redjini.com/category/12">Linux & Shell Script</a>" 분류의 다른 글</h4>
<table>
<tr><td><a href="http://blog.redjini.com/306">[shell script] bash read command</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/02/11</td></tr>
<tr><td><a href="http://blog.redjini.com/301">[linux] shell command 로그 남기기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/300">[linux] Linux Console에서 BEEP 사운드 끄기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/296">[shell] netstat</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/22</td></tr>
<tr><td><a href="http://blog.redjini.com/282">[shell script] 배열(Array) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/10</td></tr>
<tr><td><a href="http://blog.redjini.com/281">[shell script] 함수(Function) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/09</td></tr>
<tr><td><a href="http://blog.redjini.com/263">[shell script] Here Documents</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/26</td></tr>
<tr><td><a href="http://blog.redjini.com/262">[shell script] directory exists check</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/20</td></tr>
<tr><td><a href="http://blog.redjini.com/258">[shell script] 실행 경로 구하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/10/24</td></tr>
<tr><td><a href="http://blog.redjini.com/240">[shell] yum 장애 조치</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2009/04/21</td></tr>
</table></div><p><strong><a href="http://blog.redjini.com/273">글 전체보기</a></strong></p>
[shell script] Here Documents
나그네
http://blog.redjini.com/263
2014-01-02T13:18:42+09:00
2013-11-26T12:28:40+09:00
문법 <pre name="CODE" class="brush:bash highlight:[1,3]">COMMAND << DIV_STRING...DIV_STRING</pre> 셈플 소스 <pre name="CODE" class="brush:bash highlight:[2,4]">#!/bin/shcat << EOFNow path = $PWDEOF</pre>
<!-- ACEPRO -->
<div class='google_ad_line_top' id='google_ad_line_top'></div>
<div class='google_ad' id='google_ad'>
<script type='text/javascript'>
<!--
google_ad_client = 'ca-pub-8164287241783066';
/* 블로그 468*60 */
google_ad_slot = '6132571865';
google_ad_width = 468;
google_ad_height= 60;
//-->
</script>
<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>
</div>
<div class='google_ad_line_bottom' id='google_ad_line_bottom'></div>
<div class="scposts">
<h4>"<a href="http://blog.redjini.com/category/2">프로그래밍</a> / <a href="http://blog.redjini.com/category/12">Linux & Shell Script</a>" 분류의 다른 글</h4>
<table>
<tr><td><a href="http://blog.redjini.com/306">[shell script] bash read command</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/02/11</td></tr>
<tr><td><a href="http://blog.redjini.com/301">[linux] shell command 로그 남기기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/300">[linux] Linux Console에서 BEEP 사운드 끄기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/296">[shell] netstat</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/22</td></tr>
<tr><td><a href="http://blog.redjini.com/282">[shell script] 배열(Array) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/10</td></tr>
<tr><td><a href="http://blog.redjini.com/281">[shell script] 함수(Function) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/09</td></tr>
<tr><td><a href="http://blog.redjini.com/273">[linux] 메모리</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/12/17</td></tr>
<tr><td><a href="http://blog.redjini.com/262">[shell script] directory exists check</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/20</td></tr>
<tr><td><a href="http://blog.redjini.com/258">[shell script] 실행 경로 구하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/10/24</td></tr>
<tr><td><a href="http://blog.redjini.com/240">[shell] yum 장애 조치</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2009/04/21</td></tr>
</table></div><p><strong><a href="http://blog.redjini.com/263">글 전체보기</a></strong></p>
[shell script] directory exists check
나그네
http://blog.redjini.com/262
2014-01-09T17:05:05+09:00
2013-11-20T18:40:26+09:00
<pre name="CODE" class="brush:bash">#!/bin/shif [ -d "$DIRECTORY" ]; then echo "$DIRECTORY exists." fi</pre> <pre name="CODE" class="brush:bash">#!/bin/shif [ ! -d "$DIRECTORY" ]; then echo "$DIRECTORY doesn't exists." fi</pre> [code bash]#!/bin/shif [ -L "$DIRECTORY" ]; then echo "$DIRECTORY symbol...
<!-- ACEPRO -->
<div class='google_ad_line_top' id='google_ad_line_top'></div>
<div class='google_ad' id='google_ad'>
<script type='text/javascript'>
<!--
google_ad_client = 'ca-pub-8164287241783066';
/* 블로그 468*60 */
google_ad_slot = '6132571865';
google_ad_width = 468;
google_ad_height= 60;
//-->
</script>
<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>
</div>
<div class='google_ad_line_bottom' id='google_ad_line_bottom'></div>
<div class="scposts">
<h4>"<a href="http://blog.redjini.com/category/2">프로그래밍</a> / <a href="http://blog.redjini.com/category/12">Linux & Shell Script</a>" 분류의 다른 글</h4>
<table>
<tr><td><a href="http://blog.redjini.com/306">[shell script] bash read command</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/02/11</td></tr>
<tr><td><a href="http://blog.redjini.com/301">[linux] shell command 로그 남기기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/300">[linux] Linux Console에서 BEEP 사운드 끄기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/296">[shell] netstat</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/22</td></tr>
<tr><td><a href="http://blog.redjini.com/282">[shell script] 배열(Array) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/10</td></tr>
<tr><td><a href="http://blog.redjini.com/281">[shell script] 함수(Function) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/09</td></tr>
<tr><td><a href="http://blog.redjini.com/273">[linux] 메모리</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/12/17</td></tr>
<tr><td><a href="http://blog.redjini.com/263">[shell script] Here Documents</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/26</td></tr>
<tr><td><a href="http://blog.redjini.com/258">[shell script] 실행 경로 구하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/10/24</td></tr>
<tr><td><a href="http://blog.redjini.com/240">[shell] yum 장애 조치</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2009/04/21</td></tr>
</table></div><p><strong><a href="http://blog.redjini.com/262">글 전체보기</a></strong></p>
[shell script] 실행 경로 구하기
나그네
http://blog.redjini.com/258
2013-12-11T16:27:50+09:00
2013-10-24T12:02:30+09:00
<pre name="CODE" class="brush:bash highlight:[2]">#!/bin/shEXE_PATH=$(readlink -f $(dirname "$0"))echo ${EXE_PATH}</pre>
<!-- ACEPRO -->
<div class='google_ad_line_top' id='google_ad_line_top'></div>
<div class='google_ad' id='google_ad'>
<script type='text/javascript'>
<!--
google_ad_client = 'ca-pub-8164287241783066';
/* 블로그 468*60 */
google_ad_slot = '6132571865';
google_ad_width = 468;
google_ad_height= 60;
//-->
</script>
<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>
</div>
<div class='google_ad_line_bottom' id='google_ad_line_bottom'></div>
<div class="scposts">
<h4>"<a href="http://blog.redjini.com/category/2">프로그래밍</a> / <a href="http://blog.redjini.com/category/12">Linux & Shell Script</a>" 분류의 다른 글</h4>
<table>
<tr><td><a href="http://blog.redjini.com/306">[shell script] bash read command</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/02/11</td></tr>
<tr><td><a href="http://blog.redjini.com/301">[linux] shell command 로그 남기기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/300">[linux] Linux Console에서 BEEP 사운드 끄기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/27</td></tr>
<tr><td><a href="http://blog.redjini.com/296">[shell] netstat</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/22</td></tr>
<tr><td><a href="http://blog.redjini.com/282">[shell script] 배열(Array) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/10</td></tr>
<tr><td><a href="http://blog.redjini.com/281">[shell script] 함수(Function) 사용하기</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2014/01/09</td></tr>
<tr><td><a href="http://blog.redjini.com/273">[linux] 메모리</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/12/17</td></tr>
<tr><td><a href="http://blog.redjini.com/263">[shell script] Here Documents</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/26</td></tr>
<tr><td><a href="http://blog.redjini.com/262">[shell script] directory exists check</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2013/11/20</td></tr>
<tr><td><a href="http://blog.redjini.com/240">[shell] yum 장애 조치</a> <span class="scp_cm">(0)</span></td><td class="scp_date">2009/04/21</td></tr>
</table></div><p><strong><a href="http://blog.redjini.com/258">글 전체보기</a></strong></p>