728x90
반응형

2006/11/07 4

Text-Processing Basic - cut, paste, join

cut데이터 필드를 칼럼별로 구분하기 위해 제공되는 tool 이다. 디폴트 delimiter는 tab이며 -f 옵션을 통해 정의할 수 있다.cat test one two three four five six seven eight nine cut -f2 test two five eight cut -f1,3 test one three four six seven nine -f 옵션 외에 다음과 같은 옵션들이 있다.-c : Allows you to specify characters instead of fields-d : Allows you to specify a delimiter other than the tabpastecut 명령어가 파일로부터 내용을 선택하는 것이라면 paste나 join 명령어는 field를..

Server/Shell 2006.11.07

Text-Processing Basic - cat, tac, nl, head, tail

cat-b : Numbers lines-E : Shows a dollar sign($) at the end of each line-T : Shows all tabs as ^I-v : Shows nonprinting characters except tabs and carriage returns-A : Does the same as -v combined with -E and -Ttaccat과 반대의 어순에서 알 수 있듯이 파일의 내용을 반대 순서로 보여준다.nlnl은 라인에 넘버를 사용해 보여주며, cat 명령어에 -b를 붙인 것과 동일하다.head파일의 첫 부분을 보여준다. 디폴트로 처음부터 10라인 까지 보여준다head -3 numbers one two three tail파일의 아래부분부터 보여준다.he..

Server/Shell 2006.11.07
728x90
반응형