Today we had to parse one SQL error log file in UNIX box and I saw a kind diff file format -
#grep "Database mirroring is inactive" ERRORLOG.1
And i saw no output. :-(
I thought its dos2unix which can help me. BUT not!!
#file ERRORLOG.4
ERRORLOG.4: Little-endian UTF-16 Unicode English character data, with very long lines, with CRLF line terminators
grep command couldn’t parse the UTF-16 Unicode file. Hence, the file had to be converted to the format which ‘grep’ can parse.
#iconv -f UTF-16 -t UTF-8 ERRORLOG.1 | grep "Database mirroring is inactive"
And cheers! I am done.
-DK
Wednesday, October 12, 2011
Subscribe to:
Posts (Atom)
RCA - Root Cause Analysis
An important step in finding the root causes of issues or occurrences that happen within a system or organization is root cause analysis (RC...
-
I worked with a start up employer where it happened that we got an email from out Top Boss! to block all google and yahoo cousins, to promot...
-
Why I started blogging... Well, this is the ultimate question I get asked when I tell people I started a blog! I have taken a lot of time to...
-
Storytelling is an innate human quality! We often do it to teach , influence and inspire... Indian Mytholog y is one of the richest element...