"리눅스 파일 특정 행 보기"의 두 판 사이의 차이

(새 문서: *test.txt 파일에서 10번행 가져오기 <source lang='bash'> sed -n 10p < test.txt </source> 분류:리눅스)
 
1번째 줄: 1번째 줄:
==기본==
*test.txt 파일에서 10번행 가져오기
*test.txt 파일에서 10번행 가져오기
<source lang='bash'>
<source lang='bash'>
sed -n 10p < test.txt
sed -n 10p < test.txt
</source>
</source>
==고급==
*test.txt 파일에서 10번행 가져오기. (더 빠르게 하기)
<source lang='bash'>
sed -n '10p;11q' < test.txt
</source>
10번행에서 탐색을 종료하여 속도를 높힌다.


[[분류:리눅스]]
[[분류:리눅스]]

2012년 1월 12일 (목) 14:00 판

1 기본

  • test.txt 파일에서 10번행 가져오기
sed -n 10p < test.txt

2 고급

  • test.txt 파일에서 10번행 가져오기. (더 빠르게 하기)
sed -n '10p;11q' < test.txt

10번행에서 탐색을 종료하여 속도를 높힌다.

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}