alias(rm as mv)

2003-10-06 Thread Himanshu Arora
Hi All! i want rm command to be converted into mv (whatever is there after rm command) Trash/ where Trash/ is the final destination. But the alias command doesn't have any support for the above mentioned purpose. Could you suggest me a way to convert rm into mv ? Himanshu Arora IIIT Hyderabad

Re: alias(rm as mv)

2003-10-06 Thread Ed Wilts
On Mon, Oct 06, 2003 at 11:44:34PM +0530, Himanshu Arora wrote: i want rm command to be converted into mv (whatever is there after rm command) Trash/ where Trash/ is the final destination. But the alias command doesn't have any support for the above mentioned purpose. Could you suggest

Re: alias(rm as mv)

2003-10-06 Thread Herculano de Lima Einloft Neto
Himanshu Arora wrote: Hi All! i want rm command to be converted into mv (whatever is there after rm command) Trash/ where Trash/ is the final destination. But the alias command doesn't have any support for the above mentioned purpose. Could you suggest me a way to convert rm into mv ?

Re: alias(rm as mv)

2003-10-06 Thread Jeff Kinz
On Mon, Oct 06, 2003 at 04:22:36PM -0300, Herculano de Lima Einloft Neto wrote: I'm not sure this is what you want, but you could use: del() { mv -i $* ~/.Trash; } You can put it in ~/.bashrc You should find a lot about this searching around.. you shouldn't use rm as the new

Re: alias(rm as mv)

2003-10-06 Thread Herculano de Lima Einloft Neto
On Mon, 2003-10-06 at 16:43, Jeff Kinz wrote: Quick solution: here=`pwd` for i in $*; do absolutename=/${i} I take it you mean absolutename=${here}/${i} ? This still has one problem: we have to treat deletions with absolute pathnames.. there should be a command or something:

Re: alias(rm as mv)

2003-10-06 Thread Jeff Kinz
On Mon, Oct 06, 2003 at 06:00:42PM -0300, Herculano de Lima Einloft Neto wrote: On Mon, 2003-10-06 at 16:43, Jeff Kinz wrote: Quick solution: here=`pwd` for i in $*; do absolutename=/${i} I take it you mean absolutename=${here}/${i} ? Yes, that was what I intended.