LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-14-2013, 08:24 AM   #1
petercp
LQ Newbie
 
Registered: Dec 2005
Posts: 1

Rep: Reputation: 0
concatenate and sort two audit trails


captured two audit prints to a file - need to merge the files and sort the lines by date/time,then re number pages and reprint as one file.
 
Old 12-14-2013, 11:34 AM   #2
Spect73
Member
 
Registered: Aug 2013
Distribution: Slackware 14.1
Posts: 128

Rep: Reputation: Disabled
Assuming the files are text you can "merge" them just by using the 'cat' command:
Code:
cat file1 file2 >> outfile
Depending on the format of the input lines, you might get by with sorting them just by using the 'sort' command. It might be neccessary to use 'cut' and 'paste' commands to restructure the input so that it will sort in the desired manner. Or, you might need something more, a script perhaps. Hope this gets you started.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] a little help with someone else's code? (open-audit> audit.sh) Habitual Programming 1 07-26-2013 11:10 PM
How can I read the audit time stamp? msg=audit(1213186256.105:20663) abefroman Linux - Software 3 04-21-2011 07:37 PM
[Linux Audit]: Which groups should be allowed to read audit log files? quanba Linux - Security 1 11-15-2010 11:09 AM
error in line 5 of /etc/audit/audit.rules RHEL5u3 abti Red Hat 1 04-06-2010 06:42 PM
window trails mack4evr Linux - Hardware 1 08-07-2004 11:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration