Teshi's think log
  • Home
  • who am i
Sign in Subscribe

AWK

쉘 스크립트, stdout & stderr 로그 타임스탬프 찍기

쉘 스크립트를 작성하다가 stdout, stderr 앞에 일반적인 로그처럼 timestamp를 찍고 싶어서 찾아보았다. [로그 발생 프로그램] | awk '{print strftime("[%Y-%m-%d %H:%M:%S]"), $0}' > [로그 파일] 위와 같이 "awk"를 이용하여 앞에 타임스탬프를 추가할 수 있다. 단, stdout만... 그래서 검색해서 아래와 같이
Wonchul Kang 29 12월 2020

Subscribe to Teshi's think log

Don't miss out on the latest news. Sign up now to get access to the library of members-only articles.
  • Sign up
Teshi's think log © 2026. Powered by Ghost