Unix

rev, tac, cat

ForceCore 2010. 5. 11. 22:06
오늘은 이상한 프로그램을 알게 되었다.

cat: 이건 모르면 안 되는, 파일 내용 출력 프로그램.
toor@hotaru:~$ cat hi.txt
hello world!
line2

tac: 파일을 마지막줄 부터 첫 줄 순으로
toor@hotaru:~$ tac hi.txt
line2
hello world!
rev: 파일을, 첫줄부터 마지막줄 순으로 출력하되, 각 줄은 거꾸로 출력.
toor@hotaru:~$ rev hi.txt
!dlrow olleh
2enil
;; tac은 로그파일볼 때 쓸모 있겠지만 rev는 왜 있는건지 모르겠다. 재미있으라고 있는건가?