I have the following input file that you might recognize as a debian Packages
file:
Package: nimbox-apexer-sales
Version: 1.0.0-201007241449
Architecture: i386
Maintainer: Ricardo Marimon <[email protected]>
Installed-Size: 124
Depends: nimbox-apexer-root
Filename: binary/nimbox-apexer-sales_1.0.0-201007241449_i386.deb
Size: 68880
MD5sum: c4538f2913d76b57110ba73d0b87cc16
Section: base
Priority: optional
Description: Sales Application for NiMbox.
Package: nimbox-tomcat
Version: 6.0.26-5
Architecture: i386
Maintainer: Ricardo Marimon <[email protected]>
Installed-Size: 6144
Depends: sun-java6-jdk
Filename: binary/nimbox-tomcat_6.0.26-5_i386.deb
Size: 5490024
MD5sum: 5f2ccbe6137af2842e1c81bc217444e3
Section: base
Priority: optional
Description: Tomcat Servlet Application Server for NiMbox
NiMbox requires a servlet application server in order to work. The current
NiMbox implementation requires a Tomcat Servlet Application.
The file actually has many of these entries and I want to get the following file
nimbox-apexer-sales 1.0.0-201007241449
nimbox-tomcat 6.0.26-5
Where the Package
and the Version
are separated by a tab
so that I can later use cut
to get them. I'm pretty sure this can be done with sed
. I went over the sed one liners but this is probably a bit more complex. Any ideas?