일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
- import
- tomcat
- plugin
- maVen
- Mac
- IntelliJ
- ssh
- netsh
- GIT
- port
- xargs
- Windows
- 단축키
- vscode
- find
- resource
- 네트워크
- VirtualBox
- web.xml
- 줄바꿈 문자
- Windows 10
- JavaScript
- Eclipse
- lsof
- bash
- grep
- Quartz
- context
- Source
- profile
- Today
- Total
목록OS & Shell (146)
develog
http://www.cyberciti.biz/faq/bash-scripting-using-awk/ # 출력awk '{print}' test.txtawk '{print}' /etc/passwd # 라인 내용을 ':'로 컬럼 구분awk -F':' '{print $1}' /etc/passwdawk -F':' '{print $2}' /etc/passwdawk -F':' '{print $3}' /etc/passwdawk -F':' '{print $4}' /etc/passwdawk -F':' '{print $5}' /etc/passwd # 4번째 라인 출력awk "NR==4{print;exit}" /proc/net/dev # 구분자 공백awk -F' ' '{print $5,$6,$7}' result.txt
오늘 수정된 파일 찾기 find . -mtime 0 -exec ls -al --time-style=long-iso {} \; | grep ^-
#/bin/bash list=() list+=(aa) list+=(bb) list+=(cc) len=${#list[@]} idx=0 while [ $idx -lt $len ]; do echo ${list[$idx]} let "idx += 1" done
test.sh #/bin/bash dirPath=$1 echo $dirPath if [ -z $1 ]; then echo please input directory name exit fi ssh dev01@127.0.0.1 '[ ! -d baseDir/'$dirPath' ] && mkdir -p baseDir/'$dirPath echo result=$? echo end 실행 (aa 디렉토리가 없으면 생성함) aa result=0 end 실행 (aa 디렉토리가 있으면 생성안함) aa result=1 end
:set nohlsearchor:set hlsearch!
ctrl + v, 블록선택shift + i, 내용입력, esc