Sponsored Content
Top Forums Shell Programming and Scripting Error while extracting data from log file Post 302937176 by oberoi1403 on Wednesday 4th of March 2015 05:26:25 AM
Old 03-04-2015
Error while extracting data from log file

I am running awk command to extract data from log file to calculate last 15 minutes log using below command and now i am getting bellow error:
Code:
awk '$0>=$from' from=$(`date -u +"####<%d-%b-%Y %H:%M:%S o'clock GMT>"-15min`) test.log


Error:
Code:
date: 0551-402 Invalid character in date/time specification. Usage: date [-u] [+"Field Descriptors"] awk: 0602-562 Field $() is not correct.  The input line number is 1. The file is test.log.  The source line number is 1.

Can anyone see what the problem is?

Last edited by Scrutinizer; 03-04-2015 at 06:38 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

extracting recursive data file

Hi Gurus, Can awk be able to do this source file: 1|SPFE2027G1|1PFE-7000|T34801188|5066-0844| 2|T34801188|5066-0844|T35002355|5066-0845| 3|T35002355|5066-0845|T35203409|QFBR-7798| 1|SPFE2027H1|1PFE-7000|T34801198|5066-0844| 2|T34801198|5066-0844|T35002365|5066-0845| formatted into:... (1 Reply)
Discussion started by: bbeugie
1 Replies

2. UNIX for Dummies Questions & Answers

Extracting Data from a File

Hi I need to calculate the number of occurrences of a item in a number of files using Perl. The item appears continually throughout the files but in each case I only want to calculate it in certain blocks of the file. Example - Calculalte the number of occurrences of a 'pass' in a block of... (0 Replies)
Discussion started by: oop
0 Replies

3. Shell Programming and Scripting

Extracting data from a log file with date formats

Hello, I have a log file for the year, which contains lines starting with the data in the format of YYYY-MM-DD. I need to get all the lines that contain the DD being 04, how would I do this? I tried using grep "*-*04" but it didn't work. Any quick one liners I should know about? Thank you. (2 Replies)
Discussion started by: cpickering
2 Replies

4. Shell Programming and Scripting

Extracting specific lines of data from a file and related lines of data based on a grep value range?

Hi, I have one file, say file 1, that has data like below where 19900107 is the date, 19900107 12 144 129 0.7380047 19900108 12 168 129 0.3149017 19900109 12 192 129 3.2766666E-02 ... (3 Replies)
Discussion started by: Wynner
3 Replies

5. Shell Programming and Scripting

Need help in extracting data from xml file

Hello, This is my first post in here, so excuse me if I sound too noob here! I need to extract the path "/apps/mp/installedApps/V61/HRO/hrms_01698_A_qa.ear" from the below xml extract. The path will always appear with the key "binariesURL" <deployedObject... (6 Replies)
Discussion started by: abhishek2386
6 Replies

6. UNIX for Dummies Questions & Answers

Extracting data from file

I am trying to compare the data in lines 3 & 5 to see if they match up to the '-S570' (see first code set, all proprietary information has been removed from code set) spawn telnet Trying ... Connected to CA-LOS1234-ASE-S570.cl . Escape character is '^]'. CA-LOS1234-ASE-S570 Username: ... (1 Reply)
Discussion started by: slipshft
1 Replies

7. Shell Programming and Scripting

Extracting data blocks from file

Hi all, I want to extract blocks of data from a file depending on the contents of that block. The input file(table) has several blocks each starting with 'gene' in the first column. I want to extract only those blocks which do not have the expression '_T02' in the second column. Input file ... (3 Replies)
Discussion started by: newbie83
3 Replies

8. Shell Programming and Scripting

Extracting the last 10mins worth of data in a log file

Hi all, Hope someone here will be able to help me. Our system has some scripts that are run from a cron job every ten mins and is used to see how many error there are in that time frame. Problem is that in the scripts grep is used to find the data, but as the day goes on these log file grow to a... (7 Replies)
Discussion started by: Goldengreen
7 Replies

9. Shell Programming and Scripting

Extracting Delimiter 'TAG' Data From log files

Hi I am trying to extract data from within a log file and output format to a new file for further manipulation can someone provide script to do this? For example I have a file as below and just want to extract all delimited variances of tag 32=* up to the delimiter "|" and output to a new file... (2 Replies)
Discussion started by: Buddyluv
2 Replies

10. Shell Programming and Scripting

Extracting data from rsync log

Hi I have a daily rsync that runs and i am trying to find a easy way of extracting the start time and end time of the sync and extract the details of how much data was copied. I would like to use this information to see if i can increase the amount of rsyncs that run in a day. so the log... (3 Replies)
Discussion started by: treds
3 Replies
NYSHELL(1)						      General Commands Manual							NYSHELL(1)

NAME
nyshell - tool to generate shell scripts to build nypatchy output SYNOPSIS
nyshell logfile options cradle [ print ] [ .go ] DESCRIPTION
nyshell is a tool in the Nypatchy suite of programs for working with Patchy Master Files (PAM files); see nypatchy(1). Specifically, given the log file of a nypatchy run, it can create a shell script to compile all the source code files output by nypatchy. This program is sim- ilar to fcasplit except that it takes the log file as input instead of a source file, and it remembers which source code files have already been compiled in previous runs. USAGE
logfile is the name of the log file coming from nypatchy, with a default extension of ".log". A cradle file cradle may be given to add additional setup options such as desired compilers or compiler flags to use. (See the reference manual for more details.) print is the file to which informational output should be written (the default is standard output if omitted), and options is a sequence of single-char- acter flags. This program generates a shell script file named name.shfca (with name being the part of logfile sans extension) that can be run to build all object files. The file name.xqtlog "remembers" the current state. The command should be ended with ".go" unless one wants to enter the Nypatchy interactive shell. OPTIONS
Note that options should be given as a single string of characters with no space separation and no use of the - character (except that it can be used in place of the options field if no options are desired). Alphabetic options are not case-sensitive. A Force recompilation of all routines. B Bypass tests based on the .xqtlog file. E Bypass tests based on the .xqtlog file if it is empty. H Print help information only. Q "quick" - Do not print the setup. S Print the setup only (only together with H). U "up to date" - Check that all .o files are ready to go into a library. V "verbose" - Print the complete setup. SEE ALSO
fcasplit(1), nycheck(1), nydiff(1), nyindex(1), nylist(1), nypatchy(1), nymerge(1), nysynopt(1), nytidy(1), yexpand(1) The reference manual for the Nypatchy suite of programs is available in compressed PostScript format at the following URL: http://wwwasdoc.web.cern.ch/wwwasdoc/psdir/p5refman.ps.gz Running the command "nyshell help .no" also gives some brief help on usage. Running the command "nyshell - hs .no" prints the default set- up (compiler names and options) to be used in the generated shell scripts. AUTHOR
This manual page was written by Kevin McCarty <kmccarty@debian.org> for the Debian GNU/Linux system (but may be used by others). It is licensed under the GNU General Public License, version 2 or later (at your choice). COPYRIGHT
Copyright (C) Kevin B. McCarty, 2008. Mar 12, 2008 NYSHELL(1)
All times are GMT -4. The time now is 12:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy