# take names of this form STB_L1_SWEAPD_20080531_V02.cdf and # take names of this form /disks/stereodata/l1/ahead/mag/RTN/2006/11/STA_L1_MAGB_RTN_20061108_V04.cdf and # parse out the year, month, and day. BEGIN { FS= "_" } { print substr( $5, 1, 4) " " substr( $5, 5, 2) " " substr( $5, 7, 2) }