Sponsored Content
Full Discussion: More log manipulation
Top Forums Shell Programming and Scripting More log manipulation Post 97603 by zazzybob on Tuesday 31st of January 2006 11:34:43 PM
Old 02-01-2006
If your system has GNU date, how about....
Code:
$ sed 's/\\/\\\\/g' /var/tmp/logfile | while read date time rest; do
>  timestamp="${date} ${time}";
>  newdate=`date -d "${timestamp} + 10 hours" +"%Y %b %H:%M:%S:00 GMT 10"`;
>  echo "${newdate} ${rest}";
> done

EDIT: Edited to take account of backslashes in input file

Cheers
ZB

Last edited by zazzybob; 02-01-2006 at 12:41 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

manipulation

hi, i have got a table with n number of rows and 2 columns..how can i get get 1 row at a time using any unix command without copying to any file? Thanks and Regards vivek.s (13 Replies)
Discussion started by: vivekshankar
13 Replies

2. Shell Programming and Scripting

Help with log manipulation

Hi there, Scripting isnt my strong point, so any help is appreciated greatly. I have a large log file which contains details of user requests. My aim is to pull out the Time, IP address and source fields from every record but my problem is that when a request fails, the record is incomplete... (3 Replies)
Discussion started by: StevePace
3 Replies

3. Shell Programming and Scripting

File manipulation

To all Guru I have a file like test.txt 111,122,212,123 data11,date12, data13, data14...data1n data21,date22, data23, data24...data2n data31,date32, data33, data34...data3n ... ... .. datan1,daten2, datan3, datan4...datann END I have to load this data into oracle , where first... (1 Reply)
Discussion started by: u263066
1 Replies

4. UNIX for Advanced & Expert Users

File Manipulation

i have a CSV file with 2 columns Fund,Shares 1,100 2,150 3,190 The file is named as AccountNumber.txt(14888.txt,189879.txt...) That files shows the funds in that account I want to create a flat file with accountnumber as one more column since i need accountnumber also.The accoutnnumber... (1 Reply)
Discussion started by: kris01752
1 Replies

5. Shell Programming and Scripting

Text Manipulation.

Hi I have only ever used awk and sed for basic requirements up until now. I have had to break a log down for multiple purposes. Using awk, sed and a date script. I am left with this: (message id, time of msg attempt, message id, domain name, time of msg completion) ... (4 Replies)
Discussion started by: Icepick
4 Replies

6. Shell Programming and Scripting

need help in time manipulation

i have a script that gives the last time the data is inserted in a file. i want to check the time difference b/w the sytem time and the time in file. for e,g. if script runs at 3.30.So $a=3.30 and the time in file is 3.00.So $time =3.00 then the time difference should be 30 min...... ... (6 Replies)
Discussion started by: ali560045
6 Replies

7. UNIX for Dummies Questions & Answers

string manipulation

Hi, I have a file with rows of text like so : E100005568374098100000015667 D100005568374032000000112682 H100005228374060800000002430 I need to grab just the last digits(bolded) of each line without the proceeding text/numbers. Thanks (5 Replies)
Discussion started by: james6
5 Replies

8. Shell Programming and Scripting

String manipulation

Hi, i am just gettin exposed to UNIX. Could anyone of u help me out with dis problem..? i have a variable 'act' which has the value as follows, echo $act gives -0- -0- -----0---- 2008-06-04 -0- -0- echo "$act" | awk '{print ($act)}' gives, -0- -0- -----0---- 2008-06-04 -0- -0- I... (2 Replies)
Discussion started by: jerrynimrod
2 Replies

9. Shell Programming and Scripting

Log File Manipulation

I have a log file which keeps on updating. What I need to do is write a different script, which could moniter the log file continously, and email some stakeholders if some error has occured.. log file gets a message from various sources, and after getting/processing the message, prints an... (1 Reply)
Discussion started by: mukeshguliao
1 Replies

10. Shell Programming and Scripting

Data manipulation, Please help..

Hello, I have a huge set of data that needs to be reformatted. Here is a simple example to explain the process. I have number n=5 and a input with many numbers separated with comma: ... (11 Replies)
Discussion started by: liuzhencc
11 Replies
THREAD-KEYRING(7)					     Linux Programmer's Manual						 THREAD-KEYRING(7)

NAME
thread-keyring - per-thread keyring DESCRIPTION
The thread keyring is a keyring used to anchor keys on behalf of a process. It is created only when a thread requests it. The thread keyring has the name (description) _tid. A special serial number value, KEY_SPEC_THREAD_KEYRING, is defined that can be used in lieu of the actual serial number of the calling thread's thread keyring. From the keyctl(1) utility, '@t' can be used instead of a numeric key ID in much the same way, but as keyctl(1) is a program run after forking, this is of no utility. Thread keyrings are not inherited across clone(2) and fork(2) and are cleared by execve(2). A thread keyring is destroyed when the thread that refers to it terminates. Initially, a thread does not have a thread keyring. If a thread doesn't have a thread keyring when it is accessed, then it will be created if it is to be modified; otherwise the operation fails with the error ENOKEY. SEE ALSO
keyctl(1), keyctl(3), keyrings(7), persistent-keyring(7), process-keyring(7), session-keyring(7), user-keyring(7), user-session-keyring(7) Linux 2017-03-13 THREAD-KEYRING(7)
All times are GMT -4. The time now is 02:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy