Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- VirtualBox
- ssh
- xargs
- Windows 10
- vscode
- plugin
- IntelliJ
- Mac
- netsh
- maVen
- tomcat
- 네트워크
- context
- profile
- Quartz
- find
- Windows
- GIT
- grep
- web.xml
- port
- 줄바꿈 문자
- Source
- bash
- JavaScript
- Eclipse
- lsof
- resource
- 단축키
- import
Archives
- Today
- Total
develog
[Linux] awk 본문
http://www.cyberciti.biz/faq/bash-scripting-using-awk/
# 출력
awk '{print}' test.txt
awk '{print}' /etc/passwd
# 라인 내용을 ':'로 컬럼 구분
awk -F':' '{print $1}' /etc/passwd
awk -F':' '{print $2}' /etc/passwd
awk -F':' '{print $3}' /etc/passwd
awk -F':' '{print $4}' /etc/passwd
awk -F':' '{print $5}' /etc/passwd
# 4번째 라인 출력
awk "NR==4{print;exit}" /proc/net/dev
# 구분자 공백
awk -F' ' '{print $5,$6,$7}' result.txt
'OS & Shell > Linux' 카테고리의 다른 글
[Linux] Linux 버전 확인 (0) | 2015.08.21 |
---|---|
[Linux] ls 정렬 (0) | 2015.06.17 |
[Linux] 날짜 검색 (0) | 2015.01.14 |
[Linux] shell script, array, loop (0) | 2015.01.12 |
[Linux] ssh, mkdir (0) | 2015.01.12 |
Comments