0
Hi all,
I want to write a script to do the following job
I have a record like
day   ID    var    Month
1      11    x     March
2      11    y     April
3      11    y     March
4      11    y     April
5      11    y     March

1      22    y     April
2      22    x     march

3      33    x     March
4      33    y     March
5      33    y     March

I want to creat a new data in such away that if Id with a var "y" march then I exclude the entire record of that ID.

So the desired out put will be

1      22    y     April
2      22    x     march

So ID 11 and 33  are excluded because both contain "y" in march.

Your assitance is highly appreciated in advance
3
Contributors
2
Replies
16
Views
3 Years
Discussion Span
Last Post by L7Sqr
0

I'm not sure shell tools are the most straightforward to use for this purpose. Are you open to other processing tools? Scripting languages?

With something like Ruby or Python this would take 20-30 lines of code. Other things that are more suited to dealing directly with records such as R or sqlite may make the job a bit easier.

What are your constraints?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.