Skip to main content

Thread: Pipe bash commands


hey guys,

have sql script creating 2 databases, , 1 user , necessary privileges (using grant).

have bash script ./add_db -n <name> -p <prefix> processing , @ end wish replace strings within sql document, execute it.

code:
cmd="cat ${sh_dir_src}sql.add_db | sed s/__host__/${domain_host}/g | sed s/__pfx__/${prefix}/g | sed s/__pwd__/${password}/g"  eval ${cmd}    cmd="mysql -usqladm -p'**' < ${sh_dir_src}sql.add_db"  eval ${cmd}
the last 2 lines not process correctly (obviously since values not correctly replaced) how can done?

thanks!

can give error message see expansion fails?


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support New to Ubuntu Pipe bash commands


Ubuntu

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support