[PLUG] Sed syntax error
Rich Shepard
rshepard at appl-ecosys.com
Tue Nov 15 18:30:02 UTC 2016
Trying to change the date format from a forward slash (/) to a dash (-).
There's a syntax error in my sed script: "file change-date-format.sed line
6: invalid reference \3 on `s' command's RHS" and I'm not seeing why. Here's
the script:
#!/usr/bin/sed
#
# Change date format from / to -.
s/[0-9]\{4\}\/[0-9]\{2\}\/[0-9]\{2\}/\1-\2-\3/g
Please show me what I've done incorrectly here.
Rich
More information about the PLUG
mailing list