sorry for the typing mistake,i did use the closing quote when trying on
linux,though....
to say again,i typed:
alias rm='mv "$1" $HOME/trashdir'
but,on executing the foll. command:
rm testrm3 (testrm3 is a file in $HOME dir. i.e. /home/vineeta and trashdir is
under vineeta)
which gave the error:
mv: when moving multiple files,last arguement must be a directory.
Vineeta
Bret Hughes wrote:
> Vineeta wrote:
>
> >> The example uses $HOME/trashdir, not ./trasdir - the difference is
> >> important unless you have a trashdir directory in every directory where
> >> you are going to use the rm command.
> >
> >
> > I am only trying this in my home directory i.e. /home/vineeta.
> > under vineeta dir.,i have a dir. called trashdir.
> > Now,my script lies in /home/vineeta
> >
> > So,what's going wrong with alias rm='mv $1 ./trashdir' ??
> > As statux put it,use "$1" in quotes.
> > I missed out this.But,what's the difference.
> >
> > Now,if i try out what statux says i.e. alias rm='mv "$1" $HOME/trashdir" ,i get:
> >
> > mv: when moving multiple files,last arguement must be a directory.
> >
> > Vineeta
> >
>
> there is a dir and not a file named ~/trashdir right? and also what are you calling
>the command with?
>
> Make sure the alias looks like you want, Your example does not close the single
>quote. what does
>
> alias
>
> return
> Bret
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list