Hello.... I am trying to create reports off of backup log files - using cygwin (bash-> grep, awk) on WinServer2008R2/backup4all-Pro-4.6 However the log files appear to have zero fills out to 16bits so grep awk does not work. Things like bash-> cat, tail, work. All windows stuff like wordpad, textpad even notepad work. I can even copy paste from the cygwin rxvt window and vi paste and the zeros get stripped. But I am trying to script. Here is a cygwin tail list of the file followed by a octel dump of characters (od -c): (randy.log is a copy)
Administrator@resucsdapp6 /cygdrive/c/users/administrator/appdata/Roaming/Softland/Backup4all Professional 4/Logs
$ tail -2 randy.log
Backup completed at 1/3/2012 9:12:17 PM with 0 error(s), 1 warning(s)
Administrator@resucsdapp6 /cygdrive/c/users/administrator/appdata/Roaming/Softland/Backup4all Professional 4/Logs
$ od -c randy.log
0024260 \0 B \0 a \0 c \0 k \0 u \0 p \0 \0 <- (\0 means all zero bits is those 8 bits)
0024300 c \0 o \0 m \0 p \0 l \0 e \0 t \0 e \0
0024320 d \0 \0 a \0 t \0 \0 1 \0 / \0 3 \0
0024340 / \0 2 \0 0 \0 1 \0 2 \0 \0 9 \0 : \0
0024360 1 \0 2 \0 : \0 1 \0 7 \0 \0 P \0 M \0
0024400 \0 w \0 i \0 t \0 h \0 \0 0 \0 \0
0024420 e \0 r \0 r \0 o \0 r \0 ( \0 s \0 ) \0
0024440 , \0 \0 1 \0 \0 w \0 a \0 r \0 n \0
0024460 i \0 n \0 g \0 ( \0 s \0 ) \0 \r \0 \n \0
0024500
I thought maybe it is 16bit unicode so I tried piconv and even copied to real linux and tried iconv
But as you can see the results are not as I was hoping for.
root@resucsdapp1 ~]# iconv -f ISO-8859-1 -t UTF-8 randy.log -o randyconv.log
[root@resucsdapp1 ~]# ls -ld *ran*
-rw-r--r-- 1 root root 7494 Jan 3 17:26 randyconv.log
-rwx------ 1 root root 7490 Jan 3 17:23 randy.log
[root@resucsdapp1 ~]#
I will keep studying but maybe someone can give some pointers to help out on this?
Thank you..very much..

News