5

problem in binning the data

view full story
linux-howto

http://www.unix.com – hi i have some data like this input: Code: 1 apples oranges 234 2 oranges apples 2345 3 grapes bananas 1000000 4 melons banans 10000000 5 bananas apples 5000000 6 mangoes banans 2000000 7 apples bananas 1999999 i want to put all those which are coming between 1 and 999999 in to one bin (2nd bin would start from 1000000 to 1999999 and so on). my output file should look like this Code: bin1_fruits apples oranges 234 2 oranges apples 2345 Code: bin2_fruits grapes bananas 1000000 apples bananas 1999999 how to do this i am trying with perl and if needed i can post that here (HowTos)