Search Results

Search: Posts Made By: prrampalli
7,883
Posted By radoulov
If the total bytes of the filenames is below the...
If the total bytes of the filenames is below the ARG_MAX limit:

awk -F\| '/^\[/ {
_1 = $1
sub(/[^ ]+ */, x, _1)
}
{
print _1, NR, $0
}' OFS=_ /root/Desktop/test/*.* |
sort...
7,883
Posted By rbatte1
Can you confirm that the date/time stamp is in...
Can you confirm that the date/time stamp is in the format "YYYYMMDD" then Hour, minute, second, hundredth and that the lines are all headed by the date/time stamp and not split to a second line?
...
7,883
Posted By radoulov
-F\| - records are split at | _1 = $1 - save $1...
-F\| - records are split at |
_1 = $1 - save $1 into a variable because we need to modify it
sub(/[^ ]+ */, x, _1) - strip the leading part of the string currently in _1 (the part before and...
7,883
Posted By radoulov
awk -F\| '/^\[/ { _1 = $1 sub(/[^ ]+ */,...
awk -F\| '/^\[/ {
_1 = $1
sub(/[^ ]+ */, x, _1)
}
{
print _1, NR, $0
}' OFS=_ infile |
sort -t_ -k1,1 -k2,2n |
cut -d_ -f3-
7,883
Posted By rbatte1
How about:- cat /root/Desktop/test/* | awk -F\|...
How about:-
cat /root/Desktop/test/* | awk -F\| '/^\[/ {
_1 = $1
sub(/[^ ]+ */, x, _1)
}
{
print _1, NR, $0
}' OFS=_ | sort -t_ -k1,1 -k2,2n | cut -d_ -f3- >> Single2
No input file should...
7,883
Posted By radoulov
Yes, sorry, I forgot the sort ... | cut ......
Yes,
sorry, I forgot the sort ... | cut ... part :)
7,883
Posted By radoulov
OK, but this is rather different :) ... and...
OK,
but this is rather different :) ... and easier.

In your first post you gave the following example as an expected output:
[20100623 07:55:52.61|DEBUG |#000062|test123 "GET...
277,870
Posted By Neo
Simple rules of the UNIX.COM forums:
RULES OF THE UNIX AND LINUX FORUMS

For the latest version of the community rules (the official community rules page), please visit here. (https://www.unix.com/misc.php?do=cfrules)


No flames,...
Showing results 1 to 8 of 8

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