BASH variables

I'm trying to create a 'rename' alias for BASH, but I don't know how to use variable data as parameters. Here's what I have so far:
alias rename $var1$ $var2$ = 'cp $var1$ $var2$ & rm $var1$'
What do I put in places of those vars?
»
- Login to post comments

Isn't mv basically a rename?
Isn't mv basically a rename?
Agreed, why would you need
Agreed, why would you need to make an alias for rename, "mv" will rename files for you:
mv file1.txt file2.c
Dave
----
"The only thing more dangerous than a hardware guy with a code patch is a programmer with a soldering iron."
Right...
Forgot about that. Alright, thanks guys.
___________
Josh Gaber