# take names of this form STB_L1_SWEAPD_20080531_V02.cdf and # parse out the year, month, and day. { print substr( $1, 15, 4) " " substr( $1, 19, 2) " " substr( $1, 21, 2) }