Sponsored Content
Top Forums Shell Programming and Scripting Extracting logs using gunzip awk and gzip Post 302972809 by RudiC on Wednesday 11th of May 2016 02:26:33 AM
Old 05-11-2016
Plus, when doing a "string comparison", be aware that e.g. "05/26/2014" is greater than "04/26/2015" which might not be what you expect.
 

10 More Discussions You Might Find Interesting

1. HP-UX

decompress in HPUX11 by Gunzip and gzip

Hello evrebody , I have HPUX-11, i try to install "Mozilla" and "unzip utillity" I cannot decompress file (F.tar.gz) or file(F.gz) by commandes: gunzip -dv F.tar.gz | tar -xvf gunzip F.tar.gz or gzip -dv F.tar.gz |tar -xvf gzip F.gz maybe someone know What's the reason? maybe i... (1 Reply)
Discussion started by: yanly64
1 Replies

2. Shell Programming and Scripting

Extracting data from large logs.

Hi all, I have a large log file that gets created daily. I need to be able to pull text out of the log when I hit a pattern including the 7 lines above it and the 3 lines below and output it to a new text file. Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Pattern Line 9 Line 10... (11 Replies)
Discussion started by: bas
11 Replies

3. UNIX for Dummies Questions & Answers

gunzip error - not in gzip format

Hi, I am getting this error gunzip file1.tar.Z gunzip: file1.tar.Z: not in gzip format Any clues? This goes bad only in some recent installations of ids (5 Replies)
Discussion started by: eagercyber
5 Replies

4. UNIX for Dummies Questions & Answers

Cloning OracleHome (gzip/gunzip Help)

Environment: ServerA - IBM AIX 5.2 ServerB - IBM AIX 5.2 I want to clone one of my oracle installation. The easiest way is to ZIP(possibly use gzip) the installed folder from the ServerA (Here Oracle is installed and working fine) , FTP to the ServerB(Here I want to have the installation... (4 Replies)
Discussion started by: aixhp
4 Replies

5. Solaris

doubt reg gzip,gunzip

Hi, Can anyone let me explain the difference between tar , uncompress,gzip and gunzip commands. both gzip and gunzip are same i think correct me if am wrong. (1 Reply)
Discussion started by: rogerben
1 Replies

6. Shell Programming and Scripting

Awk Help for extracting report from logs

Hi I have a log file, with lines of following kind. ------------------------ 2009-05-15 07:49:42,574 INFO - SqlMapObjectDataDao - select - selectObject - 2 ms 2009-05-15 07:49:42,575 INFO - SqlMapUserDao - select - getUserSystemAdminSuperGroup - 0 ms 2009-05-15 07:49:42,576 INFO -... (3 Replies)
Discussion started by: jitendriya.dash
3 Replies

7. UNIX for Dummies Questions & Answers

gzip-gunzip a problem

Hi all, i have a gzipped file. <file_name>.gz . when i try gunzip this file i get, invalid compressed data--format violated this file gzipped like gzip -f -S <file_name> 2 > <error_log_file> there is no error in log. it seems that the file gzipped properly. how this ... (3 Replies)
Discussion started by: dummydba
3 Replies

8. UNIX for Dummies Questions & Answers

gzip to read logs

Ok here is my trouble. I run scripts whenever I am investigating problems. One of those scripts simply goes to a log folder and runs gzip -cd * | grep error | wc -l This tells me the number of errors in their log's and how much I should pay attention to them. The problem is sometimes... (3 Replies)
Discussion started by: MrEddy
3 Replies

9. UNIX for Dummies Questions & Answers

help in extracting logs in readable format

hello everyone. newbie here in unix. I am trying to extract the logs of a certain job and would like to output it in a readable format, see below the CAT part: cat /var/opt/ctma/ctm/sysout/idwesct_sh30_eng_r6_cdcs_sh.LOG_05l0du_000* | egrep -i 'orderid:|file_name=' | sed... (1 Reply)
Discussion started by: eanne_may
1 Replies

10. Shell Programming and Scripting

File name manipulation when extracting from gzip

Hi, Below is the description of my problem. I am trying to loop through the below file names sitting in the file - FileNames.txt, and trying to decompress them FileNames.txt 20150408_MGAC_.txt.gz 20150408_MGCC_.txt.gz 20150408_MGSH__.txt.gz 20150408_MGSL__.txt.gz ... (6 Replies)
Discussion started by: Richmond_CS
6 Replies
WCSNCMP(3)						     Linux Programmer's Manual							WCSNCMP(3)

NAME
wcsncmp - compare two fixed-size wide-character strings SYNOPSIS
#include <wchar.h> int wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n); DESCRIPTION
The wcsncmp() function is the wide-character equivalent of the strncmp(3) function. It compares the wide-character string pointed to by s1 and the wide-character string pointed to by s2, but at most n wide characters from each string. In each string, the comparison extends only up to the first occurrence of a null wide character (L''), if any. RETURN VALUE
The wcsncmp() function returns zero if the wide-character strings at s1 and s2, truncated to at most length n, are equal. It returns an integer greater than zero if at the first differing position i (i < n), the corresponding wide-character s1[i] is greater than s2[i]. It returns an integer less than zero if at the first differing position i (i < n), the corresponding wide-character s1[i] is less than s2[i]. ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). +----------+---------------+---------+ |Interface | Attribute | Value | +----------+---------------+---------+ |wcsncmp() | Thread safety | MT-Safe | +----------+---------------+---------+ CONFORMING TO
POSIX.1-2001, POSIX.1-2008, C99. SEE ALSO
strncmp(3), wcsncasecmp(3) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. GNU
2015-08-08 WCSNCMP(3)
All times are GMT -4. The time now is 07:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy