indexing features in a file UNIX bash or perl

November 27, 2011 at 10:09:36
Specs: Windows 7
hello guys,

I have a file like this:

input.dat


Push-to-talk 
No
Coonection
IP support 
Support for IP telephony 
Yes 
Built-in SIP stack 
Yes 
Support via software 
Yes 
Microsoft
Support for Microsoft Exchange 
Yes 
UMA 
No 
Internet
Internet connection
WAP 
Yes 
Weight 
129 g 
GUI type
Display 
Colour 
Number of colours 
262144 
Display technology 
LCD
Display Resolution
Screen resolution  
320x480 pixels  
Screen size  
3.2 inches  
Touchscreen  
Yes  
Simultaneous touch points  
3+ Multi-touch  
Type of technology  
Capacitive

and the feature list is:

featureList.dat


Speaker
Support for IP telephony 
Support for Microsoft Exchange 
UMA 
WAP 
Weight 
Bluetooth
Dimension
Display technology 
Screen resolution  
Screen size  
Touchscreen  
Type of technology
USB connsection

and the desired output is:

output.dat:

:
null
Yes
Yes
No
Yes
129 g
null
null
LCD 
320x480 pixels
3.2 inches
Yes
Capacitive
null

I want to see what are the values of the features in the input file (features have their values in the line below them)

if the feature does not exist then the value would be "null"

there are some features in the input that are not in the featureList.dat, so just the desired features are the subject for the extraction.


See More: indexing features in a file UNIX bash or perl

Report •

#1
November 28, 2011 at 15:42:39
You are going to have to explain your data more clearly. I understand that 'Push-to-talk' is 'No'.

Are you saying that 'Connection' then equals 'IP Support'?

If you are going to alternate values like that, you end up with the value 'Yes' equal 'UMA'
and 'No' equal 'Internet'.

I would like a clarification of data before I spend any time on this.


Report •
Related Solutions


Ask Question