I currently have a tab delimited text file formatted like this:David   Webb    Box 34 Rural Route 2    Nixa    MO  65714   (417)555-1478   555-66-7788 09-13-1970Martha  Kent    1122 North Hwy 5    Smallville  KS  66789   (785)555-2322   343-55-8845 04-17-1965Edward  Nygma   443 W. Broadway Gotham City NJ  12458   (212)743-3537   785-48-5524 08-08-1987I'm trying to format the dates like September 13, 1970 instead of 09-13-1970What I've been trying to do is cut -f 9 file > tmpfile and then using date -f tmpfile +%B %d, %Y > date but it keeps saying date: invalid date 09-13-1970date: invalid date 04-17-1965date: invalid date 08-08-1987what am I doing wrong?
date is saying invalid date
awk;date;cut;text formatting
Date doesn't accept that input format, try putting year first, such as stream editing the input:cut -f 9 file | sed 's/\(..\)-\(..\)-\(....\)/\3-\1-\2/' > tmpfileTesting by hand:$ date --date '09-13-1970' +%B %d, %Ydate: invalid date 09-13-1970$ date --date '09/13/1970' +%B %d, %YSeptember 13, 1970$ date --date '1970/09/13' +%B %d, %YSeptember 13, 1970$ date --date '1970-09-13' +%B %d, %YSeptember 13, 1970