我是sed命令功能的新手,我有一个日志文件,例如:
2014-09-16 18:26:59,300 INFO auerm@10.33.165.102-131 [DatabaseConnectionImpl] - performing commit
2014-09-16 18:26:59,301 DEBUG auerm@10.33.165.102-131 [DatabaseConnectionImpl] - closing all statements
2014-09-16 18:26:59,301 INFO auerm@10.33.165.102-131 [SQLPool] - returning connection to pool ecls
2014-09-16 18:26:59,301 DEBUG auerm@10.33.165.102-131 [DatabaseConnectionImpl] - closing all statements
2014-09-16 18:26:59,301 DEBUG auerm@10.33.165.102-131 [SQLPool] - 10 total, 5 available, 5 used.
2014-09-16 18:26:59,824 DEBUG auerm@10.33.165.102-131 [SQLPool] - retrieved connection from pool ecls
2014-09-16 18:26:59,824 DEBUG auerm@10.33.165.102-131 [SQLPool] - 10 total, 4 available, 6 used.
2014-09-16 18:26:59,824 DEBUG auerm@10.33.165.102-131 [Statement] - SELECT COUNT(T.sl_tr_id) FROM sl_versionset, sl_cmsra_tree T, sl_cmsra_obj, sl_cmsra_common WHERE t.sl_obj_id=sl_cmsra_obj.sl_obj_id
AND sl_cmsra_obj.sl_obj_deleted_flag=0
AND sl_cmsra_obj.sl_obj_id = sl_cmsra_common.sl_obj_id
AND sl_cmsra_common.misc like '%modified=false%'
AND sl_cmsra_obj.sl_obj_objtyp_id in (121,120,113,112,111,110)
AND t.sl_tr_deleted_flag=0
AND (sl_cmsra_obj.sl_obj_last_changed_by='auerm'
OR sl_cmsra_obj.sl_obj_created_by='auerm') AND
sl_versionset.sl_obj_id (+)= sl_cmsra_obj.sl_obj_id AND (
-- ['WIP']
sl_versionset.sl_vs_state <> 'Deprecated' AND
sl_versionset.sl_vs_next is null
OR T.sl_tr_container_flag = 1)
2014-09-16 18:26:59,967 INFO auerm@10.33.165.102-131 [DatabaseConnectionImpl] - performing commit
2014-09-16 18:26:59,967 DEBUG auerm@10.33.165.102-131 [DatabaseConnectionImpl] - closing all statements
2014-09-16 18:26:59,967 INFO auerm@10.33.165.102-131 [SQLPool] - returning connection to pool ecls
2014-09-16 18:26:59,968 DEBUG auerm@10.33.165.102-131 [DatabaseConnectionImpl] - closing all statements
2014-09-16 18:26:59,968 DEBUG auerm@10.33.165.102-131 [SQLPool] - 10 total, 5 available, 5 used.
2014-09-16 18:27:00,479 DEBUG auerm@10.33.165.102-131 [SQLPool] - retrieved connection from pool ecls
2014-09-16 18:27:00,479 DEBUG auerm@10.33.165.102-131 [SQLPool] - 10 total, 4 available, 6 used.
2014-09-16 18:27:00,479 DEBUG auerm@10.33.165.102-131 [Statement] - SELECT COUNT(T.sl_tr_id) FROM sl_versionset, sl_cmsra_tree T, sl_cmsra_obj, sl_cmsra_tlorder TLO WHERE t.sl_obj_id=sl_cmsra_obj.sl_obj_id
AND
(sl_cmsra_obj.sl_obj_WFST_ID=10 OR
sl_cmsra_obj.sl_obj_WFST_ID=30 OR
sl_cmsra_obj.sl_obj_WFST_ID=40 )
AND sl_cmsra_obj.sl_obj_objtyp_id=71
AND sl_cmsra_obj.sl_obj_deleted_flag=0
AND t.sl_tr_deleted_flag=0
and tlo.sl_obj_id=sl_cmsra_obj.sl_obj_id
and tlo.orderer = 'auerm' AND
sl_versionset.sl_obj_id (+)= sl_cmsra_obj.sl_obj_id AND (
-- ['WIP']
sl_versionset.sl_vs_state <> 'Deprecated' AND
sl_versionset.sl_vs_next is null
OR T.sl_tr_container_flag = 1)
2014-09-16 18:27:00,482 INFO auerm@10.33.165.102-131 [DatabaseConnectionImpl] - performing commit
我想要得到这些日志的第二个块来计算时间,就像根据正则表达式得到所有行一样:
/^([0-9]{4})-([0-9]{2}-)\w+ ([0-9]{2}):([0-9]{2}):([0-9]{2}),([0-9]{3})/mg
(我认为这/ mg意味着多线和全球)
当我在正则表达式测试仪上测试它时,它符合我的期望,但当我在命令上使用它时:
cat abc.log | sed '/^([0-9]{4})-([0-9]{2}-)\w+ ([0-9]{2}):([0-9]{2}):([0-9]{2}),([0-9]{3})/mg
它说它是正则表达式上无法识别的命令。
当我尝试awk&#39; {print $ 2}&#39;它会根据我的要求返回一些行,但之后我会在某个地方面对它有很多字段,我认为这些sql命令会让它变坏。我尝试的命令是:
cat abc.log | sed -n '/^2014-09-16/p' | awk '{print $2}'
所以我需要在没有sql命令的情况下从时间开始。你能帮我解决一下这个案子吗?
编辑:根据答案我正在添加另外80行日志文件,因为作为一个命令我无法做到:
2014-09-22 08:16:28,042 DEBUG gaissmaier@10.128.24.129-181 [PreparedStatement] - SELECT link_id, creation_date, created_by, category_id, show, actuate, internal_flag FROM sl_link WHERE deleted_flag = 0 AND link_id IN ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) -- [1084426, 1084366, 1084461, 1084481, 1149527, 1084484, 1084449, 1084423, 1084347, 1084469, 1084487, 1084420, 1084360, 1084363, 1084385, 1085563, 1084382, 1085560, 1085566, 1084357, 1084417, 1084433, 1084414, 1084474, 1084438, 1084411, 1084350, 1084477, 1084455, 1084392, 1084376, 1084395, 1084398, 1085551, 1084405, 1085557, 1084429, 1085554, 1084401, 1084379]
2014-09-22 08:16:28,045 DEBUG gaissmaier@10.128.24.129-181 [PreparedStatement] - SELECT anchor_id, link_id, creation_date, created_by, pending_flag, pending_since, validated_date, resource_type, resource_uri, resource_info, resource_id, pointer_type, pointer_info, pointer, anchor_syntax, pp_id, sequence FROM sl_source_anchor WHERE deleted_flag = 0 and link_id in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) ORDER BY link_id, sequence -- [1084426, 1084366, 1084461, 1084481, 1149527, 1084484, 1084449, 1084423, 1084347, 1084469, 1084487, 1084420, 1084360, 1084363, 1084385, 1085563, 1084382, 1085560, 1085566, 1084357, 1084417, 1084433, 1084414, 1084474, 1084438, 1084411, 1084350, 1084477, 1084455, 1084392, 1084376, 1084395, 1084398, 1085551, 1084405, 1085557, 1084429, 1085554, 1084401, 1084379]
2014-09-22 08:16:28,076 DEBUG gaissmaier@10.128.24.129-181 [PreparedStatement] - SELECT anchor_id, link_id, creation_date, created_by, pending_flag, pending_since, validated_date, resource_type, resource_uri, resource_info, resource_id, pointer_type, pointer_info, pointer, anchor_syntax, pp_id, sequence FROM sl_target_anchor WHERE deleted_flag = 0 and link_id in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) ORDER BY link_id, sequence -- [1084426, 1084366, 1084461, 1084481, 1149527, 1084484, 1084449, 1084423, 1084347, 1084469, 1084487, 1084420, 1084360, 1084363, 1084385, 1085563, 1084382, 1085560, 1085566, 1084357, 1084417, 1084433, 1084414, 1084474, 1084438, 1084411, 1084350, 1084477, 1084455, 1084392, 1084376, 1084395, 1084398, 1085551, 1084405, 1085557, 1084429, 1085554, 1084401, 1084379]
2014-09-22 08:16:28,082 DEBUG gaissmaier@10.128.24.129-181 [PreparedStatement] - SELECT DISTINCT sl_link.link_id, sl_source_anchor.anchor_id, sl_target_anchor.anchor_id FROM sl_link, sl_target_anchor, sl_CMSRA_tree TARGET_ALIAS_3, sl_versionset TARGET_ALIAS_2, sl_source_anchor WHERE sl_link.deleted_flag = 0 AND sl_link.pending = 0 AND
TARGET_ALIAS_2.sl_obj_id (+) = sl_target_anchor.resource_id AND TARGET_ALIAS_3.sl_obj_id = sl_target_anchor.resource_id AND ((
-- ['WIP']
TARGET_ALIAS_2.sl_vs_state <> 'Deprecated' AND
TARGET_ALIAS_2.sl_vs_next is null
) OR sl_target_anchor.resource_id IS NULL OR TARGET_ALIAS_3.sl_tr_container_flag = 1) AND sl_source_anchor.resource_uri IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) AND sl_source_anchor.pending_flag = 0 AND sl_source_anchor.link_id=sl_link.link_id AND sl_source_anchor.deleted_flag = 0 AND sl_target_anchor.pending_flag = 0 AND sl_target_anchor.link_id=sl_link.link_id AND sl_target_anchor.deleted_flag = 0 ORDER BY 1 -- [ecls:io:ecls/3/1015555, ecls:io:ecls/3/991291, ecls:io:ecls/3/772431, ecls:io:ecls/3/932498, ecls:io:ecls/3/580886, ecls:io:ecls/3/1127746, ecls:io:ecls/3/985308, ecls:io:ecls/3/935446, ecls:io:ecls/3/934784, ecls:io:ecls/3/995336, ecls:io:ecls/3/1153511, ecls:io:ecls/3/1155750, ecls:io:ecls/3/994629, ecls:io:ecls/3/936319, ecls:io:ecls/3/932681, ecls:io:ecls/3/993620, ecls:io:ecls/3/932324, ecls:io:ecls/3/581503, ecls:io:ecls/3/1013902, ecls:io:ecls/3/1146016, ecls:io:ecls/3/534916, ecls:io:ecls/3/1040315, ecls:io:ecls/3/932867, ecls:io:ecls/3/993356, ecls:io:ecls/3/1038906, ecls:io:ecls/3/1041365, ecls:io:ecls/3/581482, ecls:io:ecls/3/581191, ecls:io:ecls/3/1041362, ecls:io:ecls/3/985334, ecls:io:ecls/3/991459, ecls:io:ecls/3/931958, ecls:io:ecls/3/864357, ecls:io:ecls/3/935174, ecls:io:ecls/3/847145, ecls:io:ecls/3/994638, ecls:io:ecls/3/1038862, ecls:io:ecls/3/989179, ecls:io:ecls/3/1127956, ecls:io:ecls/3/1012113]
2014-09-22 08:16:28,363 DEBUG gaissmaier@10.128.24.129-181 [PreparedStatement] - SELECT link_id, creation_date, created_by, category_id, show, actuate, internal_flag FROM sl_link WHERE deleted_flag = 0 AND link_id IN ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) -- [575423, 581411, 985352, 991821, 575427, 991825, 864400, 991829, 935668, 903219, 903192, 811178, 985159, 811172, 575431, 985348, 1147467, 575435, 1154228, 575439, 581405, 1155847, 581408, 993626, 580864, 1149173, 580868, 991578, 802877, 581388, 580872, 580860, 802834, 993138, 1012114, 811291, 1012117, 993610, 1014008, 802760, 779242, 811196, 1014004, 802764, 991279, 575447, 935680, 935684, 724502, 575443, 903187, 1012123, 985341, 985345, 935449, 994647, 575419, 935676, 811181, 724498, 1154583, 1154587, 864397, 811204, 811188, 864394, 989232, 580893, 935672, 578642, 1012120]
2014-09-22 08:16:28,367 DEBUG gaissmaier@10.128.24.129-181 [PreparedStatement] - SELECT anchor_id, link_id, creation_date, created_by, pending_flag, pending_since, validated_date, resource_type, resource_uri, resource_info, resource_id, pointer_type, pointer_info, pointer, anchor_syntax, pp_id, sequence FROM sl_source_anchor WHERE deleted_flag = 0 and link_id in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) ORDER BY link_id, sequence -- [575423, 581411, 985352, 991821, 575427, 991825, 864400, 991829, 935668, 903219, 903192, 811178, 985159, 811172, 575431, 985348, 1147467, 575435, 1154228, 575439, 581405, 1155847, 581408, 993626, 580864, 1149173, 580868, 991578, 802877, 581388, 580872, 580860, 802834, 993138, 1012114, 811291, 1012117, 993610, 1014008, 802760, 779242, 811196, 1014004, 802764, 991279, 575447, 935680, 935684, 724502, 575443, 903187, 1012123, 985341, 985345, 935449, 994647, 575419, 935676, 811181, 724498, 1154583, 1154587, 864397, 811204, 811188, 864394, 989232, 580893, 935672, 578642, 1012120]
2014-09-22 08:16:28,448 DEBUG gaissmaier@10.128.24.129-181 [PreparedStatement] - SELECT anchor_id, link_id, creation_date, created_by, pending_flag, pending_since, validated_date, resource_type, resource_uri, resource_info, resource_id, pointer_type, pointer_info, pointer, anchor_syntax, pp_id, sequence FROM sl_target_anchor WHERE deleted_flag = 0 and link_id in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) ORDER BY link_id, sequence -- [575423, 581411, 985352, 991821, 575427, 991825, 864400, 991829, 935668, 903219, 903192, 811178, 985159, 811172, 575431, 985348, 1147467, 575435, 1154228, 575439, 581405, 1155847, 581408, 993626, 580864, 1149173, 580868, 991578, 802877, 581388, 580872, 580860, 802834, 993138, 1012114, 811291, 1012117, 993610, 1014008, 802760, 779242, 811196, 1014004, 802764, 991279, 575447, 935680, 935684, 724502, 575443, 903187, 1012123, 985341, 985345, 935449, 994647, 575419, 935676, 811181, 724498, 1154583, 1154587, 864397, 811204, 811188, 864394, 989232, 580893, 935672, 578642, 1012120]
2014-09-22 08:16:28,501 INFO gaissmaier@10.128.24.129-181 [DatabaseConnectionImpl] - performing commit
2014-09-22 08:16:28,502 DEBUG gaissmaier@10.128.24.129-181 [DatabaseConnectionImpl] - closing all statements
2014-09-22 08:16:28,502 INFO gaissmaier@10.128.24.129-181 [SQLPool] - returning connection to pool ecls
2014-09-22 08:16:28,502 DEBUG gaissmaier@10.128.24.129-181 [DatabaseConnectionImpl] - closing all statements
2014-09-22 08:16:28,502 DEBUG gaissmaier@10.128.24.129-181 [SQLPool] - 10 total, 5 available, 5 used.
2014-09-22 08:16:28,609 DEBUG gaissmaier@10.128.24.129-604 [SQLPool] - retrieved connection from pool ecls
2014-09-22 08:16:28,609 DEBUG gaissmaier@10.128.24.129-604 [SQLPool] - 10 total, 4 available, 6 used.
2014-09-22 08:16:28,610 DEBUG gaissmaier@10.128.24.129-604 [Statement] - SELECT sl_obj_display_title, sl_obj_created_date, sl_obj_created_by, sl_obj_last_changed_date, sl_obj_last_changed_by, sl_obj_check_out_flag, sl_obj_check_out_date, sl_obj_check_out_by, sl_obj_objtyp_id, sl_obj_content_size, sl_obj_link_indicator, sl_obj_content_format, sl_obj_content_lang, sl_obj_content_charset, sl_obj_wfst_id, sl_obj_wfst_changed_by, sl_obj_wfst_changed_date, sl_obj_content_flag, O.sl_obj_id FROM SL_CMSRA_OBJ O, SL_CMSRA_CONTENT C WHERE C.sl_obj_id = O.sl_obj_id AND sl_obj_deleted_flag = 0 AND O.sl_obj_id IN (935446, 1012113, 935174, 1040315, 985334, 994629, 994638, 1127956, 1146016, 1153511, 580886, 581482, 993356, 864357, 1013902, 995336, 993620, 1155750, 989179, 1149480, 1041365, 1127746)
2014-09-22 08:16:28,686 DEBUG gaissmaier@10.128.24.129-604 [PreparedStatement] - (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 1012113 AND elm_id IN ('SL994263', 'SL994267', 'SL992506', 'SL781497')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 935446 AND elm_id IN ('SL935448')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 935174 AND elm_id IN ('SL935671', 'SL935675', 'SL935679', 'SL935667', 'SL935683')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 1040315 AND elm_id IN ('SL772364', 'SL802773', 'SL802763')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 985334 AND elm_id IN ('SL935420', 'SL935428', 'SL935432', 'SL936271', 'SL993137')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 994629 AND elm_id IN ('SL991278')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 994638 AND elm_id IN ('SL989231')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 1127956 AND elm_id IN ('SL724501', 'SL575359', 'SL575355', 'SL575418', 'SL581387', 'SL575363', 'SL724497', 'SL575426', 'SL575422', 'SL575434', 'SL575438', 'SL575430', 'SL575446', 'SL575442')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 1146016 AND elm_id IN ('SL1147466', 'SL1149171')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 1153511 AND elm_id IN ('SL802868', 'SL802863', 'SL779533', 'SL811203', 'SL802876', 'SL1154227', 'SL1154586', 'SL1154582', 'SL777176', 'SL811171', 'SL811195')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 580886 AND elm_id IN ('SL534986')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 993356 AND elm_id IN ('SL993609')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 581482 AND elm_id IN ('SL575387')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 864357 AND elm_id IN ('SL772645', 'SL772644', 'SL772643', 'SL903191')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 1013902 AND elm_id IN ('SL991828', 'SL991820', 'SL991824', 'SL991816', 'SL991577', 'SL1014003')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 995336 AND elm_id IN ('SL985158')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 993620 AND elm_id IN ('SL993609')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 1155750 AND elm_id IN ('SL1155845')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 989179 AND elm_id IN ('SL989231')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 1149480 AND elm_id IN ('SL995205', 'SL1015547', 'SL995208', 'SL995206', 'SL995207', 'SL1015516', 'SL1015517', 'SL574870', 'SL1015525', 'SL1015524', 'SL996783', 'SL1149526', 'SL1015519', 'SL1085550', 'SL1012105', 'SL1012102', 'SL1085547', 'SL535484', 'SL1085546', 'SL535485', 'SL1085545', 'SL535482', 'SL535483', 'SL1085549', 'SL535486', 'SL1085548', 'SL500106', 'SL500105', 'SL500109', 'SL500108', 'SL500107', 'SL1015373', 'SL1015565', 'SL995210', 'SL995216', 'SL995215', 'SL540243', 'SL540244', 'SL995213', 'SL540245')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 1041365 AND elm_id IN ('SL779241')) UNION (SELECT obj_id, elm_id, elm_name, pre_order, post_order FROM SL_ID_ELEMENTS WHERE obj_id = 1127746 AND elm_id IN ('SL534972', 'SL534973', 'SL534974', 'SL534975')) ORDER BY obj_id, pre_order -- []
2014-09-22 08:16:28,827 INFO gaissmaier@10.128.24.129-604 [DatabaseConnectionImpl] - performing commit
2014-09-22 08:16:28,827 DEBUG gaissmaier@10.128.24.129-604 [DatabaseConnectionImpl] - closing all statements
2014-09-22 08:16:28,827 INFO gaissmaier@10.128.24.129-604 [SQLPool] - returning connection to pool ecls
2014-09-22 08:16:28,828 DEBUG gaissmaier@10.128.24.129-604 [DatabaseConnectionImpl] - closing all statements
2014-09-22 08:16:28,828 DEBUG gaissmaier@10.128.24.129-604 [SQLPool] - 10 total, 5 available, 5 used.
2014-09-22 08:16:28,870 DEBUG canlier@10.176.24.136-131 [SQLPool] - retrieved connection from pool ecls
2014-09-22 08:16:28,870 DEBUG canlier@10.176.24.136-131 [SQLPool] - 10 total, 4 available, 6 used.
2014-09-22 08:16:28,871 DEBUG canlier@10.176.24.136-131 [PreparedStatement] - SELECT sl_tr_display_title, sl_obj_created_date, sl_obj_created_by, sl_tr_sortkey, sl_tr_parent, sl_tr_predecessor, sl_tr_successor, sl_tr_level, sl_tr_path, sl_tr_container_flag, sl_tr_container_type, T.sl_obj_id, sl_tr_splitnode_flag, sl_tr_original_flag FROM SL_CMSRA_TREE T, SL_CMSRA_OBJ O WHERE T.sl_tr_id = ? AND T.sl_obj_id = O.sl_obj_id AND T.sl_tr_deleted_flag = 0 -- [1119674]
2014-09-22 08:16:28,873 INFO canlier@10.176.24.136-131 [DatabaseConnectionImpl] - performing rollback
2014-09-22 08:16:28,874 DEBUG canlier@10.176.24.136-131 [DatabaseConnectionImpl] - closing all statements
2014-09-22 08:16:28,874 INFO canlier@10.176.24.136-131 [SQLPool] - returning connection to pool ecls
2014-09-22 08:16:28,875 DEBUG canlier@10.176.24.136-131 [DatabaseConnectionImpl] - closing all statements
2014-09-22 08:16:28,875 DEBUG canlier@10.176.24.136-131 [SQLPool] - 10 total, 5 available, 5 used.
2014-09-22 08:16:28,875 DEBUG gaissmaier@10.128.24.129-603 [SQLPool] - retrieved connection from pool ecls
2014-09-22 08:16:28,876 DEBUG gaissmaier@10.128.24.129-603 [SQLPool] - 10 total, 4 available, 6 used.
2014-09-22 08:16:28,876 DEBUG gaissmaier@10.128.24.129-603 [Statement] - SELECT sl_obj_display_title, sl_obj_created_date, sl_obj_created_by, sl_obj_last_changed_date, sl_obj_last_changed_by, sl_obj_check_out_flag, sl_obj_check_out_date, sl_obj_check_out_by, sl_obj_objtyp_id, sl_obj_content_size, sl_obj_link_indicator, sl_obj_content_format, sl_obj_content_lang, sl_obj_content_charset, sl_obj_wfst_id, sl_obj_wfst_changed_by, sl_obj_wfst_changed_date, sl_obj_content_flag, O.sl_obj_id FROM SL_CMSRA_OBJ O, SL_CMSRA_CONTENT C WHERE C.sl_obj_id = O.sl_obj_id AND sl_obj_deleted_flag = 0 AND O.sl_obj_id IN (985308, 802837, 1036421, 935577, 1040315, 994638, 935574, 991465, 989363, 772431, 989229, 989345, 802841, 992489, 1013935, 1015555, 985153, 777138, 994625, 994072, 994629, 935583, 989374, 992317, 935568, 993352, 935580, 995336, 993620, 989179, 802757, 989356)
2014-09-22 08:16:28,922 DEBUG gaissmaier@10.128.24.129-603 [Statement] - SELECT T.sl_tr_id, T.sl_obj_id FROM SL_CMSRA_TREE T WHERE T.sl_tr_deleted_flag = 0 AND T.sl_tr_original_flag=1 AND T.sl_obj_id IN (772431, 995336, 993352, 989229, 992489, 1013935, 1036421, 994629, 993620, 994625, 935577, 994638, 989179, 935583, 935580, 1015555, 985308, 991465, 985153, 989345, 1040315, 935574, 992317, 802757, 935568, 802837, 989374, 994072, 777138, 989363, 802841, 989356)
2014-09-22 08:16:28,927 DEBUG gaissmaier@10.128.24.129-603 [Statement] - SELECT sl_tr_display_title, sl_obj_created_date, sl_obj_created_by, sl_tr_sortkey, sl_tr_parent, sl_tr_predecessor, sl_tr_successor, sl_tr_level, sl_tr_path, sl_tr_container_flag, sl_tr_container_type, T.sl_obj_id, sl_tr_splitnode_flag, sl_tr_original_flag, sl_tr_id FROM SL_CMSRA_TREE T, SL_CMSRA_OBJ O WHERE T.sl_obj_id = O.sl_obj_id AND T.sl_tr_deleted_flag = 0 AND T.sl_tr_id IN (985308, 802837, 1036421, 935577, 1040315, 935574, 994638, 991465, 989363, 772431, 989229, 989345, 802841, 1015555, 1013935, 992489, 777138, 985153, 994625, 994629, 994072, 935583, 989374, 992317, 993352, 935568, 935580, 993620, 995336, 989179, 802757, 989356)
2014-09-22 08:16:28,947 DEBUG gaissmaier@10.128.24.129-603 [PreparedStatement] - SELECT T.sl_tr_id, T.sl_tr_container_flag, sl_CMSRA_obj.sl_obj_wfst_id, sl_CMSRA_obj.sl_obj_check_out_flag, sl_CMSRA_obj.sl_obj_link_indicator, sl_CMSRA_obj.sl_obj_objtyp_id, '0', '1', sl_CMSRA_obj.sl_obj_check_out_by, sl_CMSRA_obj.sl_obj_content_flag, sl_CMSRA_obj.sl_obj_reuse_flag, T.sl_tr_splitnode_flag, sl_CMSRA_obj.sl_obj_note_flag, T.sl_obj_id, P.sl_tr_path, 3 AS slma_pp_id, VS.sl_vs_id, NVL(VS.sl_vs_state,'-'), NVL(VS.sl_vs_label,'-'), t.sl_tr_display_title, sl_CMSRA_obj.sl_obj_last_changed_date, sl_CMSRA_common.language, sl_CMSRA_workflow.workflow_status, sl_CMSRA_cont.productserieskey, sl_CMSRA_versionset.sl_vs_label, sl_CMSRA_versionset.sl_vs_state, sl_CMSRA_cont.techctr, sl_CMSRA_cont.prodareas, sl_CMSRA_cont.appgroup, sl_CMSRA_series.appseries, sl_CMSRA_obj_objtype.SLMA_OBJTYP_DISPLAY_TITLE, sl_CMSRA_media.mediatype, sl_CMSRA_modules.infoclass, sl_CMSRA_obj.sl_obj_last_changed_by, sl_CMSRA_obj.sl_obj_check_out_by, sl_CMSRA_cont.projectname, sl_CMSRA_cont.description, sl_CMSRA_cont.duedate, sl_CMSRA_modules.tbdeleted FROM sl_CMSRA_obj_objtype, sl_CMSRA_media, sl_CMSRA_tree T, sl_versionset VS, sl_CMSRA_obj, sl_CMSRA_workflow, sl_CMSRA_common, sl_CMSRA_modules, sl_CMSRA_tree P, sl_CMSRA_versionset, sl_CMSRA_series, sl_CMSRA_cont WHERE P.sl_tr_id(+)=T.sl_tr_parent AND sl_CMSRA_obj.sl_obj_id=T.sl_obj_id AND T.sl_tr_deleted_flag=0 AND sl_CMSRA_obj.sl_obj_deleted_flag=0 AND VS.sl_obj_id(+)=sl_CMSRA_obj.sl_obj_id AND sl_CMSRA_obj_objtype.sl_obj_id(+)=T.sl_obj_id AND sl_CMSRA_media.sl_obj_id(+)=T.sl_obj_id AND sl_CMSRA_workflow.sl_obj_id(+)=T.sl_obj_id AND sl_CMSRA_common.sl_obj_id(+)=T.sl_obj_id AND sl_CMSRA_modules.sl_obj_id(+)=T.sl_obj_id AND sl_CMSRA_versionset.sl_obj_id(+)=T.sl_obj_id AND sl_CMSRA_series.sl_obj_id(+)=T.sl_obj_id AND sl_CMSRA_cont.sl_obj_id(+)=T.sl_obj_id AND T.sl_tr_id IN (772431, 995336, 993352, 989229, 992489, 1013935, 1036421, 994629, 993620, 994625, 935577, 994638, 989179, 935583, 935580, 1015555, 985308, 991465, 985153, 989345, 1040315, 935574, 992317, 802757, 935568, 802837, 989374, 994072, 777138, 989363, 802841, 989356) ORDER BY T.sl_tr_sibling_order -- []
2014-09-22 08:16:29,383 INFO gaissmaier@10.128.24.129-603 [DatabaseConnectionImpl] - performing commit
答案 0 :(得分:0)
你可以使用这个awk:
awk '$1 ~ /^([0-9]{4})-([0-9]{2}-[0-9]{2})/{print $2}' file
18:26:59,300
18:26:59,301
18:26:59,301
18:26:59,301
18:26:59,301
18:26:59,824
18:26:59,824
18:26:59,824
18:26:59,967
18:26:59,967
18:26:59,967
18:26:59,968
18:26:59,968
18:27:00,479
18:27:00,479
18:27:00,479
18:27:00,482
答案 1 :(得分:0)
sed -n 's/^[0-9-]\{10\} \([0-9,:]\{1,\}\) .*/\1/p' YourFile
GNU sed的posix版本(--posix
)
<强>的解释强>
n
仅使用p
操作打印内容(没有其他内容)s///
代表(在这种情况下用于删除不需要的信息)^[0-9-]\{10\}
从第一个字符开始,仅使用数字和-
并包含第一个空格字符。它也作为第一组(\(...\)
)\([0-9,:]\{1,\}\)
是我们当选的信息,因此第二组基于数字,,
和:
(至少1个字符)蚂蚁采取最大可能的.*
正在进行下一个空格char +行的其余部分\1
替换第一组内容(搜索模式中唯一的一组)p
打印选项(因此没有任何内容不会与搜索模式相关)