Hello rdcwayx and Everybody,
The shell script of convert the date from MM/DD/YYYY to YYYYMMDD working fine but it does not work when the date field does not have the 8 characters.
For this kind of files I would like to complete the field date in all rows to 8 characteres. I know that the command date -d +%D could help me with this purpose.
SPY,D,11/2/2009,104.13,105.41,103.08,104.32,254222900
SPY,D,11/3/2009,103.74,104.8,103.54,104.65,228362600
SPY,D,11/4/2009,105.51,106.33,104.65,104.92,247996700
SPY,D,11/5/2009,105.66,106.88,105.44,106.85,180015300
SPY,D,11/6/2009,106.26,107.4,106.05,107.13,170954100
SPY,D,11/9/2009,107.95,109.63,107.87,109.57,159495700
SPY,D,11/10/2009,109.31,109.93,108.97,109.59,171899800
SPY,D,11/11/2009,110.31,110.82,109.62,110.15,169466200
SPY,D,11/12/2009,110,110.57,108.75,109.03,157144500
SPY,D,11/13/2009,109.31,110.09,108.75,109.62,150963000
SPY,D,11/16/2009,110.38,111.69,110.32,111.21,210922200
SPY,D,11/17/2009,110.92,111.39,110.5,111.34,147134100
SPY,D,11/18/2009,111.26,111.43,110.57,111.27,156486800
SPY,D,11/19/2009,110.51,111.31,109.13,109.82,208734600
SPY,D,11/20/2009,109.25,109.76,109.01,109.43,134196000
SPY,D,11/23/2009,110.72,111.74,110.6,110.82,148010200
SPY,D,11/24/2009,111,111.2,110.01,110.99,138420100
SPY,D,11/25/2009,111.17,111.5,110.82,111.38,109564800
SPY,D,11/27/2009,108.4,110.32,108.29,109.57,126001800
SPY,D,11/30/2009,109.48,110.2,108.12,109.94,160874800
SPY,D,12/1/2009,110.92,111.66,110.73,111.3,159613700
SPY,D,12/2/2009,111.28,112.01,110.92,111.25,131331000
An example of the final output of the file could be
SPY,D,20091201,110.92,111.66,110.73,111.3,159613700
SPY,D,20091202,111.28,112.01,110.92,111.25,131331000
I really appreciate your help with a script for this issue
Carlos