I am new to bash and I have a file like this :
2012-11-22 11:36:55,909 1353551815756 1353551815909 0 true myapi 10 203051 203051:ShopDb:ShopDb
2012-11-22 11:37:00,292 1353551820146 1353551820292 0 true myapi 10 201897 201897:ShopDb:ShopDb
2012-11-22 11:38:01,824 1353551881672 1353551881824 0 true myapi 10 203051 203051:ShopDb:ShopDb
In a loop,line I want to extract date part (2012-11-22 11:36:55) convert to time-stamp and assign to a variable(or simply dis
How to achieve this in bash ?
By setting the IFS to a space and comma makes it easy to extract the 1st 2 fields in the while loop.