Could anyone help me with this using sed or Awk.
I have got a text file with so many lines and i need to strip off unwanted xtars as below.
Input file contains:
Upperlands-Roadside/Main16x2|8+2Mbps/2Mb#1
Telsat-vineland/Main16x2|8+2Mbps/2Mb#1
market-university/Main8x2|8+2Mbps/2Mb#2
Runway-hall/Frame16x2|8+2Mbps/2Mb#1
Telsat-vineland/Main16x2|8+2Mbps/2Mb#1
market-university/Main8x2|8+2Mbps/2Mb#2
Runway-hall/Frame16x2|8+2Mbps/2Mb#1
All i need in Output file is:
Upperlands-Roadside
Telsat-vineland
market-university
Runway-hall
Telsat-vineland
market-university
Runway-hall
I have tried using this sed command to find the unwanted xters starting from the / and replacing it with no space but it does not work.
NB: Remember there are so many other columns in the input file
sed 's/[/][a-zA-Z0-9].[/]//'g inputfile > outputfile