date_split 236 B

1234567891011121314151617
  1. #! /bin/csh -ef
  2. # split date
  3. # ccyymmdd
  4. # into
  5. # 'ccyy mm dd'
  6. #
  7. set ccyymmdd = $1
  8. set ccyy = `echo $ccyymmdd | cut -c 1-4`
  9. set mm = `echo $ccyymmdd | cut -c 5-6`
  10. set dd = `echo $ccyymmdd | cut -c 7-8`
  11. echo "$ccyy $mm $dd"