using sed to remove characters from mysql -
i utilize next script dump mysql database names , remove unwanted chars(leading trailing | , spaces). works in removing of them though sed intended remove leading spaces.... why?
mysql -uuser -pmypass--skip-column-names -e "select schema_name information_schema.schemata schema_name not in ('linking', 'information_schema');" | sed 's/^ *//'
try :
sed 's/^ *//;s/ *$//'
mysql sed
No comments:
Post a Comment