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.
the last 2 lines not process correctly (obviously since values not correctly replaced) how can done?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}
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
Post a Comment