Last active
January 6, 2020 14:54
-
-
Save matthewrmshin/c3e25e57a0cadd91b5d53e854076c63f to your computer and use it in GitHub Desktop.
Convert YYYYMMDDhhmm to YYYY-MM-DD hh:mm:00 in column 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sed -f | |
# To use: | |
# 1. Download or copy this script. | |
# 2. Save it in a suitable location. E.g. ./datetime.sed | |
# 3. Ensure this script is executable. | |
# 4. Run: ./datetime.sed IN-FILE > OUT-FILE | |
s/^\([0-9]\{4\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)/\1-\2-\3 \4:\5:00/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment