dbm - Use shell script wrapper to enter commands into a new shell -
to begin, don't know if have worded title correctly, here goes.
i trying enter commands shell script in following mannger:
#!/bin/sh dbm2 table the_table
however, after command dbm2
run, current shell gets replaced dbm2
shell, , can no longer continue shell wrapper script.
manually, done following:
server_name% dbm2 dbm: no table> table the_table
this bring the_table
table dbm2.
how can use shell wrapper script replace manual procedure entering commands new shell generated shell script?
if sequence of commands fixed (does not change run run), might able use:
#!/bin/sh dbm2 <<eof table the_table ...other commands... eof ls # demonstrate shell continues
the <<eof
notation here-doc. lines line containing eof input command dbm2
.
if content of commands needs vary, may able pipe input dbm2
.
in script, if manually enter commands dbm2
, quit, original shell script should continue. table the_table
line treated shell command , would, likely, fail.
Comments
Post a Comment