Sponsored Content
Full Discussion: Gathering info on one line
Top Forums Shell Programming and Scripting Gathering info on one line Post 37585 by HowardIsHigh on Monday 23rd of June 2003 05:03:48 AM
Old 06-23-2003
Gathering info on one line

Hi all again,

here is the file i am working on :

GREIMBAJ00;BAN_CAV;Loader.sh;2003/06/13;17:04:04
GREIMBAJ00;BAN_CAV;Loader.sh;2003/06/13;17:04:06
GREIMBAJ00;BAN_PAK;Loader.sh;2003/06/13;17:04:11
GREIMBAJ00;BAN_PAK;Loader.sh;2003/06/13;17:04:18
GREIMBAJ00;PER_COT;Loader.sh;2003/06/13;17:04:16
GREIMBAJ00;PER_COT;Loader.sh;2003/06/13;17:04:21
GREIMBAJ00;PER_COT;Traitement.sh;2003/06/13;17:04:18
GREIMBAJ00;PER_COT;Traitement.sh;2003/06/13;17:04:25
GREIMBAJ01;BAN_CAV;Traitement.sh;2003/06/13;17:04:35
GREIMBAJ01;BAN_CAV;Traitement.sh;2003/06/13;17:05:03
GREIMBAJ02;BAN_PAK;Traitement.sh;2003/06/16;09:19:56
GREIMBAJ02;BAN_PAK;Traitement.sh;2003/06/16;09:20:00
GREIMBAJ02;BAN_PAK;Delete.sh;2003/06/16;09:20:03
GREIMBAJ02;BAN_PAK;Delete.sh;2003/06/16;09:20:05
GREIMBAJ04;BAN_LIE;Pretraitement.sh;2003/06/16;09:27:34
GREIMBAJ04;BAN_LIE;Pretraitement.sh;2003/06/16;09:27:37
GREIMBAJ04;BAN_RAV;Traitement.sh;2003/06/16;09:27:39
GREIMBAJ04;BAN_RAV;Traitement.sh;2003/06/16;09:28:23

Here is what i want to do :

When 2 lines are identical (excepting the hour), for instance :

GREIMBAJ00;PER_COT;Traitement.sh;2003/06/13;17:04:18
GREIMBAJ00;PER_COT;Traitement.sh;2003/06/13;17:04:25


i would like to obtain the following result :

GREIMBAJ00;PER_COT;Traitement.sh;2003/06/13;17:04:18;17:04:25

But I dont have any idea on how to make this working...Smilie

Any help would be appreciated !

Thanks

Regards

Howard
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Gathering system configuration

Hi there, I have been asked to write a script that gathers enough information on our Sun Solaris machines to be able to rebuild and configure them if they should go pop. My question is does anybody have any suggestions on the files that I need to take a copy of, to ensure that everything is... (4 Replies)
Discussion started by: hcclnoodles
4 Replies

2. UNIX for Dummies Questions & Answers

Time difference between each line info....

Hi all, here is a problem, i am having a data in a file of this format, cat filename|grep -ivn edc|tr -s ' ' +|cut -d+ f1,12 1 01:18:38 2007 25 01:43:38 2007 48 01:58:45 2007 71 02:11:02 2007 102 02:19:51 2007 and so on ........ ....... . here... (4 Replies)
Discussion started by: gsp
4 Replies

3. Shell Programming and Scripting

Data gathering script

I am pretty new at shell scripting, but I managed to make a primative shell script to connect from my webserver (bluehost) to an external data server via ftp or sftp or whatever I need. This script is : #!/bin/sh HOST='ftp.host.com' USER='username' PASSWD='password' FILE='file' ftp -n... (7 Replies)
Discussion started by: mesoeast
7 Replies

4. HP-UX

HP-UX configuration gathering tool

Hello! I would like to introduce a tool for gathering information on the HP- UX operating system. I would like to hear experts opinions about this utility, its prospects and usefulness. Any feedbacks, suggestions, bug reports, feature requests etc are welcome. The tool project web page:... (0 Replies)
Discussion started by: ahaidukov
0 Replies

5. UNIX for Advanced & Expert Users

Gathering data using SAR

Hi everyone, I would like to ask if it is possible to gather SAR data on a specified time. let say yesterdays report, i want to get data at around 12PM and 5PM. thank you. (2 Replies)
Discussion started by: cwiggler
2 Replies

6. Shell Programming and Scripting

Script to loop line in a file and add info or do echo

I have a record.txt it will update weekly, and it could be 2 lines or more ... it just echo each line to the script san jose,23.34% tampa,2.15% dallas,30.20% seattle,44.29% Unknown,16.72% How do i write a shell script to give me a test.pl or bash file which contain #!/home/perl... (8 Replies)
Discussion started by: sabercats
8 Replies

7. Shell Programming and Scripting

HELP: Shell Script to read a Log file line by line and extract Info based on KEYWORDS matching

I have a LOG file which looks like this Import started at: Mon Jul 23 02:13:01 EDT 2012 Initialization completed in 2.146 seconds. -------------------------------------------------------------------------------- -- Import summary for Import item: PolicyInformation... (8 Replies)
Discussion started by: biztank
8 Replies

8. Shell Programming and Scripting

Adding line in a file using info from previous line

I have a shell script that looks something like the following: mysql -uroot db1 < db1.sql mysql -uroot db2 < db2.sql mysql -uroot db3 < db3.sql mysql -uroot db4 < db4.sql .... different db names in more than 160 lines. I want to run this script with nohup and have a status later. So,... (6 Replies)
Discussion started by: MKH
6 Replies

9. Shell Programming and Scripting

Gathering usage statistics

so i have a script that runs across many servers. i'd like to know how many times this script is being used on each server. the only straight forward, non-intrusive way i can think of doing this is to include a line in the script to make a webcall to a central server. and from that central... (9 Replies)
Discussion started by: SkySmart
9 Replies

10. Shell Programming and Scripting

2 Loops gathering input

Greetings all, I have came up with some code, to read an input file and generate a list, here is a sample of what I am working with. The variable $USER will be inputted by the person running the utility. do folder=${line%} echo "$folder $USER done < list.txt sample of list.txt- ... (15 Replies)
Discussion started by: jeffs42885
15 Replies
FALSE(P)						     POSIX Programmer's Manual							  FALSE(P)

NAME
false - return false value SYNOPSIS
false DESCRIPTION
The false utility shall return with a non-zero exit code. OPTIONS
None. OPERANDS
None. STDIN
Not used. INPUT FILES
None. ENVIRONMENT VARIABLES
None. ASYNCHRONOUS EVENTS
Default. STDOUT
Not used. STDERR
Not used. OUTPUT FILES
None. EXTENDED DESCRIPTION
None. EXIT STATUS
The false utility shall always exit with a value other than zero. CONSEQUENCES OF ERRORS
Default. The following sections are informative. APPLICATION USAGE
None. EXAMPLES
None. RATIONALE
None. FUTURE DIRECTIONS
None. SEE ALSO
true COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html . IEEE
/The Open Group 2003 FALSE(P)
All times are GMT -4. The time now is 06:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy