Assign a command to execute a file

Hi all,
I want to assign a command name to a file.e.g.
suppose I have a .sh file "xyz.sh". I want to execute the file by typing in "abc".
The desired output is:
$ abc
should execute the "xyz.sh" file.
Kind Regards,
Qasim

Can depend somewhat on your shell.

Have a look at the man page for alias.

HTH

you could do a symlink

ln -s /path/xyz.sh /path/abc

or a hard link if they are in the same filesystem

ln /path/xyz.sh /path/abc

the path of abc can be the same or anyother different from xyz.sh

or you could use an alias.

A little comment: if you create a symlink/hard link, assuming your path is in $PATH
Otherwise, an alias works nickel :slight_smile:

Thanks a lot guys