Unix

파일에서 제어문자 제거하기-strings 명령 이용

She쥐포s 2010. 7. 22. 09:07

파일 내의 모든 제어문자를 제거하기 위한 방법(^M, ^H,  ^I(탭) 등)

$ strings FILENAME > FILENAME.another

----------
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                             UNIX GURU UNIVERSE
                                UNIX HOT TIP
                       Unix Tip 3450 - July 21, 2010
                   http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

STRING STRIPPING

Remove all ^M and other control
characters from file ABC

strings ABC > ABC-good

This tip generously supported by:
brillj@constellation.navy.mil

반응형