Date: Sun, 1 Mar 2009 06:45:26 -0600 (CST) From: Lars Eighner <luvbeastie@larseighner.com> To: Fbsd1 <fbsd1@a1poweruser.com> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: link to dos2unix Message-ID: <20090301064520.Y95262@qroenaqrq.6qbyyneqvnyhc.pbz> In-Reply-To: <49AA4EAB.8080009@a1poweruser.com> References: <49AA4EAB.8080009@a1poweruser.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 1 Mar 2009, Fbsd1 wrote: > I get message ==oops you renamed me using unix2dos instead. Someone else has already replied that the binary only knows what to do by checking the name used to call it. The way to do what you want is to use an alias in your shell. In BASH this would be alias d2u='dos2unix' in .profile. Then run source .profile, or log out and log in. This may vary according to which shell you use. Consult the man for your shell. The reason this works is that the shell resolves the alias before it calls the command, so the command never knows what you really typed. A number of applications are like this. Aliasing is the right way to make shortcut names, rather than creating links. If you want the alias to work system-wide, edit the system confifuration file for the particular shell. If users use several different shell, you do have to add the alias to each distinct configuration file. -- Lars Eighner http://www.larseighner.com/index.html 8800 N IH35 APT 1191 AUSTIN TX 78753-5266
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090301064520.Y95262>