fischer@utower.gopas.sub.org (Axel Fischer) (12/16/89)
OS: 386/iX 2.02 (SYS V.3) BashVersion: 1.03 What is wrong with the following alias ? : alias rm="/bin/mv \!* /usr/spool/limbo" mv tells me: "Target must be directory" Ok, I thought, it's not like csh it's like ksh: alias rm="/bin/mv \$* /usr/spool/limbo" "rm foo" mv tells me: "mv: foo exists" What am I doing wrong ? I can't use a function cause of the SIGIOT I get (the other posting) -Axel -- fischer@utower.gopas.sub.org / fischer@db0tui6.BITNET / fischer@tmpmbx.UUCP Bang-Europe : ...!{doitcr,gopnbg,tmpmbx}!utower!fischer Bang-USA : ...!uunet!unido!gopnbg!utower!fischer Too low for zero ...
chet@cwns1.CWRU.EDU (Chet Ramey) (12/18/89)
In article <XXL&N*@utower.gopas.sub.org> fischer@utower.gopas.sub.org writes: >BashVersion: 1.03 UPGRADE... >Ok, I thought, it's not like csh it's like ksh: > >alias rm="/bin/mv \$* /usr/spool/limbo" >"rm foo" > >mv tells me: "mv: foo exists" You're right. It's not like csh, it's like ksh. ksh and bash aliases do not take arguments; they are simple textual replacements. What you're doing up there is moving all of the command line args you gave bash along with /usr/spool/limbo to foo. This is what functions are for (modulo bugs, of course :-) >I can't use a function cause of the SIGIOT I get (the other posting) UPGRADE... Chet -- Chet Ramey Network Services Group "Where's my froggie?" Case Western Reserve University chet@ins.CWRU.Edu
fischer@utower.gopas.sub.org (Axel Fischer) (12/18/89)
chet@cwns1.CWRU.EDU (Chet Ramey) writes: >You're right. It's not like csh, it's like ksh. ksh and bash aliases do >not take arguments; they are simple textual replacements. What you're doing >up there is moving all of the command line args you gave bash along with >/usr/spool/limbo to foo. >This is what functions are for (modulo bugs, of course :-) Thanks ! I've hoped there is a way with alias. With functions it is no problem, but if you don't have 1.04 :-) -Axel -- fischer@utower.gopas.sub.org / fischer@db0tui6.BITNET / fischer@tmpmbx.UUCP Bang-Europe : ...!{doitcr,gopnbg,tmpmbx}!utower!fischer Bang-USA : ...!uunet!unido!gopnbg!utower!fischer Too low for zero ...