Reprint blog.chinaunix.net/uid-71729-i…

If you want to delete some characters from a string, you can do this:

# Echo "2006-11-21" 22:16:30 | sed 's / - / / g | sed' s / / / g | sed 's / : / / g'Copy the code

The result is 20061121221630