Sponsored Content
Top Forums Shell Programming and Scripting Separate a file on the basis of timestamp Post 302648573 by arijitsaha on Wednesday 30th of May 2012 05:58:46 AM
Old 05-30-2012
I want the fragmentation on the basis of timestamp.i.e. data for today will be there and rest copied to some other file. also all the data for that timestamp should come.
Code:
Time: 120524 14:06:06
# User@Host:  @  [5.85.46.21]  Id: 11111111
# Query_time: 0.000564  Lock_time: 0.000056 Rows_sent: 0  Rows_examined: 2
SET timestamp=00000000;

like if it today's date matches with 120524 then all the lines below it should come.i.e user@host, id, query_time lock_time,rows_sent,rows_examined,set timestamp

Moderator's Comments:
Mod Comment edit by bakunin: please use [CODE]..[/CODE]-tags to enclose terminal output and code. It makes the text better readable.

Last edited by bakunin; 05-30-2012 at 07:05 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sorting of files on the basis of timestamp

Hi, With the help of below script im able to get the count of all the .xml files but that count is not specific to a day ie its the total count of all .xml files what i want is specific to 1 day and that of every half an hr ie from 23 feb 2009 7 am till 23rd feb 2009 2300 am and from 07:00 to... (1 Reply)
Discussion started by: ss_ss
1 Replies

2. Shell Programming and Scripting

Separate date timestamp use awk or sed command ?

Hi, I have logfile like this : Actually the format is date format : yyyymmddHHMMSS and i want the log become this format yyyy-mm-dd HH:MM:SS for example 2009-07-19 11:46:52 Can somebody help me ? Thanks in advance (3 Replies)
Discussion started by: justbow
3 Replies

3. Shell Programming and Scripting

Split one file to Multiple file with report basis in unix

Hi, Please help on this. i want split the below file(11020111.CLT) to more files with some condition. :b: 1) %s stating of the report 2) %e ending of the report example starting of the report: %sAEGONCA| |MUMBAI | :EXPC|N|D ending of the report %eAEGONCA| |MUMBAI | :EXPC 3)so the... (10 Replies)
Discussion started by: krbala1985
10 Replies

4. Shell Programming and Scripting

Getting a relative timestamp from timestamp stored in a file

Hi, I've a file in the following format 1999-APR-8 17:31:06 1500 3 45 1999-APR-8 17:31:15 1500 3 45 1999-APR-8 17:31:25 1500 3 45 1999-APR-8 17:31:30 1500 3 45 1999-APR-8 17:31:55 1500 3 45 1999-APR-8 17:32:06 1500 3 ... (1 Reply)
Discussion started by: vaibhavkorde
1 Replies

5. Shell Programming and Scripting

FTP a file on Hourly basis

Hi, I have to upload a file test_201105281100.txt to a ftp location. The files will be created on hourly basis like test_201105281100.txt, test_201105281200.txt & so on. After a file is uploaded successfully, I need to rename the file as test_201105281100.success & if it is not uploaded... (11 Replies)
Discussion started by: SunilB2011
11 Replies

6. UNIX for Dummies Questions & Answers

How to compare a file by its timestamp and store in a different location whenever timestamp changes?

Hi All, I am new to unix programming. I am trying for a requirement and the requirement goes like this..... I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
Discussion started by: mailsara
2 Replies

7. UNIX for Dummies Questions & Answers

Splitting the file basis of Line Number

Can u pls advise the unix command as I have a file which contain the records in the below format 333434 435435 435443 434543 343536 Now the total line count is 89380 , now i want to create a separate I am trying to split my large big file into small bits using the line... (2 Replies)
Discussion started by: punpun66
2 Replies

8. Shell Programming and Scripting

Script to move file on a daily basis

Hi! Please I need help on the a script that would pick one file in a directory, change its name, them change its permissions, them move to a different directory, but has to be done on a daily basis, and the file that is being moved to its final destination has to have the following format:... (7 Replies)
Discussion started by: fretagi
7 Replies

9. Shell Programming and Scripting

Splitting XML file on basis of line number into multiple file

Hi All, I have more than half million lines of XML file , wanted to split in four files in a such a way that top 7 lines should be present in each file on top and bottom line of should be present in each file at bottom. from the 8th line actual record starts and each record contains 15 lines... (14 Replies)
Discussion started by: ajju
14 Replies

10. Shell Programming and Scripting

Looping through XML file on basis of a node

<?xml version="1.0" encoding="UTF-8"?> <Document> <FIToFICstmrCdtTrf> <GrpHdr> <MsgId>10001</MsgId> <NbOfTxs>1</NbOfTxs> <IntrBkSttlmDt>2015-05-06</IntrBkSttlmDt> <SttlmInf> <SttlmMtd>CLRG</SttlmMtd> </SttlmInf> <PmtTpInf> ... (2 Replies)
Discussion started by: harish2015
2 Replies
JAVAHELPER(1)							   User Commands						     JAVAHELPER(1)

NAME
Javahelper - Part of the Java Helper packaging tools Refer to the tutorials in /usr/share/doc/javahelper for more detail SYNOPSIS
jh_makepkg [options] OPTIONS
-h --help: show this text -V --version: show the version -p<name> --package=<name>: Set the name of the package (defaults to directory name without version) -m<name> --maintainer=<name>: Set the maintainer name (defaults to DEBFULLNAME, NAME, or the user's full name) -e<email> --email=<email>: Set the maintainer email (defaults to DEBEMAIL EMAIL or user@host) -v<version> --upstream=<version>: Set the upstream version (defaults to the directory name after a -) -c --clean: Tidy up common problems with Java source packages. Removes .class, .jar files and pre-built javadoc trees before creating the orig.tar.gz Pick One: -l --library: This is a library package -a --app: This is an application package Pick One: -t --ant: Build with ant -k --makefiles: Build with make -n --none: Create own buildsystem Pick One: -g --gcj: Build with gcj -d --default: Build with default free compiler -o --openjdk: Build with OpenJDK 6 -o7 --openjdk7: Build with OpenJDK 7 Environment Variables: DEBEMAIL: Default maintainer email address EMAIL: Default maintainer email address DEBFULLNAME: Default maintainer name NAME: Default maintainer name Javahelper Version 0.5 January 2008 JAVAHELPER(1)
All times are GMT -4. The time now is 10:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy