Re: creating file name from command line argument.



In article <1148399536.398747.267470@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"papu" <prachar@xxxxxxxxx> 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@xxxxxxxxxxxx
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 ***
.



Relevant Pages