Linux shell script to delete some characters in a string

Reprint http://blog.chinaunix.net/uid-71729-id-114582.html

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

#Echo “2006-11-21 22:16:30” | sed ‘s/-//g’ | sed ‘s/ //g’ | sed ‘s/://g’

The result is: 20061121221630

Guess you like

Origin blog.csdn.net/weixin_44578029/article/details/111319815