Search Results

Search: Posts Made By: gini32
4,524
Posted By binlib
(GNU) sort on Linux has a -z option to sort NULL...
(GNU) sort on Linux has a -z option to sort NULL delimited, multi-line records:
sed 's/^2013/\x0&/' log-file |sort -z |tr -d '\0'
4,524
Posted By Don Cragun
Hi gini32, Reformatting pamu's script and...
Hi gini32,
Reformatting pamu's script and adding line numbers for discussion purposes:
1 awk '
2 /2013/{if(s){print s}
3 s=$0}
4 !/2013/{s=s"_^_"$0}
5 END{ print s}
6 ' file3 | sort...
4,524
Posted By pamu
Try sth like this... $ awk...
Try sth like this...


$ awk '/2013/{if(s){print s}s=$0}
!/2013/{s=s"_^_"$0}END{print s}' file3 | sort | sed 's/_\^_/\n/g'

2013/02/05 15:33:12.234|abc|xyz| This is first single line message....
5,360
Posted By dr.house
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 06:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy