I have a text file which has the following lines:
Customer Details Report - A03_2014-01-04_09-00-09.txt
DemandResetFailureReport_2014-01-04_11-00-08.txt
ExcessiveMissingReadsReport_2014-01-04_09-00-11.txt
LipaBillingSumCheckReport_2014-01-04_11-00-08.txt
LipaUsageBillingReport_2014-01-04_12-55-06.txt
I want to run a command in UNIX (say, sed
) which will edit the contents of the text file as:
Customer Details Report
DemandResetFailureReport
ExcessiveMissingReadsReport
LipaBillingSumCheckReport
LipaUsageBillingReport
I came across some commands such as sed '/^pattern/ d'
to remove all lines after pattern. But where is the text file specified in the command?