sed can be used to substitute
eg. substitute : with nothing, and do for every occurrence (represented by g)
sed 's/://g'
s/X/Y/ replaces X with Y / represents nothing g represents every occurance
Below removed [ and ]
sed 's/[][]//g'below removes , 7 and l
sed 's/[,7l]//g'
sed 's/.*[/]//'For example, if you are trying to get the log format for apache (centos):
grep ^ErrorLog /etc/httpd/conf/httpd.conf | awk '{print $2}' | sed 's/.*[/]//'Returns
error_logSometimes format is error.log