tags:

views:

18

answers:

2

So i want to run a script that requires me to input the name of a file.

For example: /userthatisnotme/bin/move filename

So I want to make it easier for me to remember, so I can just type move filename instead of that whole path.

How can I do this?

+2  A: 

In your bash_profile (or other shell profile script):

alias my_move="/userthatisnotme/bin/move"

Examples of aliases for ls here: http://github.com/adamv/dotfiles/blob/master/bashrc#L45

The "parameters" get placed after the alias name. For more complicated situations, you could make a shell function instead of an alias.

Adam Vandenberg
A: 

use a sub routine.

mymove(){
 /userthatisnotme/bin/move "$1"
}

save this in your library eg mylibrary. when you want to use it, just source it. . mylibrary or source mylibrary

ghostdog74