Notice
Recent Posts
Recent Comments
목록tail (2)
준호씨의 블로그
tail 커맨드에서 첫 라인 제외 하고 나머지 출력 하는 방법
some.log 라는 파일이 다음과 같을 때 aaa bbb ccc tail -n +2 some.log 의 결과는 bbb ccc 가 나온다. 한줄 더 제거 하고 싶으면 다음과 같이 하면 된다. tail -n +3 some.log ccc -n x 옵션에서 x 에 + 를 붙이면 x-1 만큼 라인을 빼고 tail 을 한다고 보면 된다. 참고 https://stackoverflow.com/questions/339483/how-can-i-remove-the-first-line-of-a-text-file-using-bash-sed-script
IT이야기
2018. 8. 10. 00:50
osx에서 coreutils(gnu util) 사용하기. grep, find, tail 등등
osx에도 grep, find, tail 등등 gnu커맨드와 비슷한 커맨드들이 있습니다. 그런데 gnu유틸의 커맨드들과는 조금씩 동작이 다른 경우가 있는데요. 예를 들어 아래와 같이 -n 옵션을 뒤에 적어 주면 해당 옵션은 무시되고 오류가 발생하는데요. $ tail -f some.log -n 3 tail: -n: No such file or directory tail: 3: No such file or directory ==> some.log Caveats Commands also provided by macOS and the commands dir, dircolors, vdir have been installed with the prefix "g". If you need to use these comm..
개발이야기
2018. 2. 25. 20:34