I tried sed below. It doesn't give me error
alias sqllog="apply 'db2 -tvf %1 > sed s/sql/log/ %1' " . Can someone
point out where I am going wrong. Thanks.
Papu
This is a discussion on creating file name from command line argument. - Unix ; Hello, I am using sql as alias to run db2 command in ksh shell. alias sqllog="apply 'db2 -tvf %1 > %1.log'" This command adds .log to foo1.sql. Please give me a solution to replace .sql with .log Thanks Papu...
Hello,
I am using sql as alias to run db2 command in ksh shell.
alias sqllog="apply 'db2 -tvf %1 > %1.log'"
This command adds .log to foo1.sql.
Please give me a solution to replace .sql with .log
Thanks
Papu
I tried sed below. It doesn't give me error
alias sqllog="apply 'db2 -tvf %1 > sed s/sql/log/ %1' " . Can someone
point out where I am going wrong. Thanks.
Papu
In article <1148399536.398747.267470@j33g2000cwa.googlegroups. com>,
"papu"wrote:
> Hello,
>
> I am using sql as alias to run db2 command in ksh shell.
> alias sqllog="apply 'db2 -tvf %1 > %1.log'"
> This command adds .log to foo1.sql.
>
> Please give me a solution to replace .sql with .log
Aliases don't do parameter substitution, use a function.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***