Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

POWERSHELL" COPY LINES WHICH CONTAINS DATE IN CSV FILE"

$
0
0

I want to copy /filter lines from csv file to another excel sheet or csv file which contains lines starting with dates if it starts with text I dont want to copy it.My csv file looks like this

Required help


Date_received,date_occurred,time_to_close,event_handle,CLASS,status,severity,mc_host,tec_class,help_key,msg,mc_object_class,mc_object,mc_parameter,mc_parameter_value,mc_owner,mc_object_owner,mc_origin,mc_origin_key,mc_origin_sev,mc_event_category,ap_id,bao_action,bao_notify,bao_reply_received,delay_action,check_delay,da_instance,da_oncall,da_oncall_group,da_instance_oncall,da_supported,ecc_supported,environment,support_level,disposition,host_os,os_detail,repeat_count,incident_id,renotify,send_email,to_email,send_page,to_page,send_incident,to_incident,send2bao,to_bao,send2console,send2log,to_logfile,thresh_action,thresh_count,thresh_seconds,el_event_id,el_event_type,mc_client_address,adapter_host,snmp_enterprise,snmp_vals,mc_operations

BMC Impact Query 7.3.02.19 (Build 1684421 - 27-Oct-2010),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Copyright 1998-2010 BMC Software, Inc. as an unpublished work.  All rights reserved.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
3/9/2013 23:00,3/10/2013 23:00,0,50331328,DATABASE_EVENT,CLOSED,WARNING,THD729SQ,DataBaseEmail,,"DataBaseEmail sqlrebuildix Rebuild index failed on ProfileAbstractionInternal in instance D1XX01, Rebuild Index Skipped. THD729SQ.",,,,,,,,,,,,,,NO,-1,90,,NO,-,none,NO,NO,DEVELOPMENT,0,INSTALLATION,W2K3-X64ENTERPRISE,RTM+SP2,0,,0,NO,,NO,,NO,,NO,,NO,NO,,[],[],[],,,10.40.239.30,THD729SQ,,,[]
BMC Impact Query 7.3.02.19 (Build 1684421 - 27-Oct-2010),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Copyright 1998-2010 BMC Software, Inc. as an unpublished work.  All rights reserved.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
3/9/2013 23:00,3/11/2013 23:00,0,50331381,DATABASE_EVENT,CLOSED,WARNING,THQ001SQ,DbmsInitializationFailure,,DbmsInitializationFailure SqlNight Could not initialize SQL Server instance q1rt06. THQ001SQ autosysRun,,,,,,,,,,,,,,NO,0,0,,NO,-,none,YES,YES,QA,2,CERTIFIED,W2K3-ENTERPRISE,RTM+SP1,0,,0,NO,DA_NTGRP_Email_Group,NO,DA_ONCALL_MSSQLServer_Page_Group,NO,,NO,,NO,NO,,[],[],[],,,10.41.247.4,THQ001SQ,,,[]
BMC Impact Query 7.3.02.19 (Build 1684421 - 27-Oct-2010),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Copyright 1998-2010 BMC Software, Inc. as an unpublished work.  All rights reserved.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
3/9/2013 23:01,3/9/2013 23:01,1,50331390,INFRA_EVENT,CLOSED,WARNING,TEBEMPU1,BEM_xMatters_Exchange_SynTran,,BEM-xMatters-Exchange synthetic transaction,Synthetic_Transaction,,,,Notify,,,,,,,,,NO,0,0,,NO,-,none,NO,YES,PRODUCTION,1,CERTIFIED,LINUX,RHEL5 ADVANCED - 64 BIT,0,,0,YES,BEM_xMatters_Exchange_SynTran_mail_group,NO,,NO,,NO,,NO,NO,,[],[],[],,,10.80.113.78,,,,[]
3/9/2013 23:01,3/9/2013 23:01,19,50331391,INFRA_EVENT,CLOSED,WARNING,TEBEMPU1,BEM-BAO-BL.synthetic,,BEM-BAO-BL synthetic transaction,Synthetic_Transaction,BEM-BAO-BL,Status,test,BAO,,,,,,,run_script /trvapps/bmc/impact/scripts/BEM-BAO-BL.synthetic.pl,AFTER,NO,0,90,,NO,-,none,NO,YES,PRODUCTION,1,CERTIFIED,LINUX,RHEL5 ADVANCED - 64 BIT,0,,0,NO,,NO,,NO,,YES,,NO,NO,,[],[],[],,,10.80.113.78,,,,[]
3/9/2013 23:01,3/9/2013 23:01,0,50331403,INFRA_EVENT,CLOSED,OK,TEBEMPU1,BEM-BAO-BL.synthetic,,BEM-BAO-BL synthetic transaction,Synthetic_Transaction,BEM-BAO-BL,Status,test,,,,,,,,,,NO,-1,90,,NO,-,none,NO,YES,PRODUCTION,1,CERTIFIED,LINUX,RHEL5 ADVANCED - 64 BIT,0,,0,NO,,NO,,NO,,NO,,NO,NO,,[],[],[],,,10.80.113.78,,,,[]
3/9/2013 23:02,3/9/2013 23:02,0,50331422,DATABASE_EVENT,CLOSED,WARNING,THQ005SR,DataBaseEmail,,"DataBaseEmail SqlNight Q1RT17 Networker Backup failed (VSS), last backup:24 hours, path: W:\MSSQL.17\MSSQL\Backup. THQ005SR autosysRun",,,,,,,,,,,,,,NO,0,1800,,NO,-,none,YES,YES,QA,2,CERTIFIED,W2K3-X64ENTERPRISE,RTM+SP2,0,,0,NO,DA_NTGRP_Email_Group,NO,,NO,,NO,,NO,NO,,[],[],[],,,10.80.104.46,THQ005SR,,,[]
3/9/2013 23:02,3/9/2013 23:02,0,50331423,DATABASE_EVENT,CLOSED,WARNING,THQ005SQ,DataBaseEmail,,"DataBaseEmail SqlNight Q1RT06 Networker Backup failed (VSS), last backup:72 hours, path: K:\MSSQL.6\MSSQL\Backup. THQ005SQ",,,,,,,,,,,,,,NO,0,1800,,NO,-,none,YES,YES,QA,2,CERTIFIED,W2K3-X64ENTERPRISE,RTM+SP1,0,,0,NO,DA_NTGRP_Email_Group,NO,,NO,,NO,,NO,NO,,[],[],[],,,10.80.77.51,THQ005SQ,,,[]
3/9/2013 23:02,3/9/2013 23:02,0,50331424,DATABASE_EVENT,CLOSED,WARNING,THQ005SR,DatabaseNetworker,,"SQLNIGHT Q1RT17 Networker Backup failed (VSS), last backup:24 hours, path: W:\MSSQL.17\MSSQL\Backup.  Command to rerun:PERL.EXE d:\da$utils\sqlnight.pl Q1RT17 -NETWORKERONLY",Database,Q1RT17,,,,,,,,,,,,NO,0,0,,NO,-,none,YES,YES,QA,2,CERTIFIED,W2K3-X64ENTERPRISE,RTM+SP2,0,,0,NO,,NO,,NO,,NO,,NO,YES,MSSQL_EVENTS_networker,[],[],[],,,10.80.104.46,THQ005SR,,,[]
3/9/2013 23:02,3/9/2013 23:02,0,50331426,DATABASE_EVENT,CLOSED,INFO,THQ02HQT,DataBaseBackupError,,"LOCATION NO-MATCH: hostname=THQ02HQT,  tec_class=DataBaseBackupError, BEM Class=DATABASE_EVENT,  msg=DataBaseBackupError SqlNight Non DBCC Database backup process failed on instance Q1RT08. THQ02HQT. autosysRun",,,,,,,,,,,,,,NO,0,1200,,NO,,none,,NO,UNKNOWN,9,UNKNOWN,UNKNOWN,,0,,1,NO,,NO,DA_ONCALL_MSSQLServer_Page_Group,NO,,NO,,NO,YES,location_rec_not_found,[],[],[],,,10.82.4.61,THQ02BST,,,[]


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>