你好,我想根据当前行信息,在其上一行和下一行加入特定语句。
组合成带日志输出的oracle sqlplus下执行的语句。谢谢!
—————————————————————-
$c|Select-String “aaaxxxb”
E:\myfile\work\20161220\01_aaaxxxb_dbm.sql
E:\myfile\work\20161220\02_aaaxxxb_code.sql
$c|Select-String “new”
E:\myfile\work\20161220\04_new_other.sql
E:\myfile\work\20161220\05_new_grants.sql
—————————————————————
想转换成的语句如下
spool E:\myfile\work\20161220\01_aaaxxxb_dbm.log
@E:\myfile\work\20161220\01_aaaxxxb_dbm.sql
spool off;
spool E:\myfile\work\20161220\01_aaaxxxb_code.log
@E:\myfile\work\20161220\02_aaaxxxb_code.sql
spool off;
spool E:\myfile\work\20161220\04_new_other.log
@E:\myfile\work\20161220\04_new_other.sql
spool off;
spool E:\myfile\work\20161220\05_new_grants.log
@E:\myfile\work\20161220\05_new_grants.sql
spool off;