The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Merging last and syslog data on time
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Merging last and syslog data on time
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
07-17-2008
Franklin52
Moderator
Join Date: Feb 2007
Posts: 4,346
If you have the first output in
file1
and the second output in
file2
:
Code:
awk ' NR==FNR{split($2,s,"/");i=s[2];a[i]=$3;next} a[$7]{$0=$0 FS a[$7]} {print} '
file2 file1
If you get errors use nawk, gawk or /usr/xpg4/bin/awk on Solaris.
Regards
Franklin52
View Public Profile
Find all posts by Franklin52
Find Franklin52's past nominations received
Find Franklin52's present nominations given