Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: create a symlink generically..



On Wed, Apr 8, 2009 at 7:11 PM, fREW Schmidt <frioux@xxxxxxxxx> wrote:
Hi all,

I am trying to make a script that will make a bunch of symlinks.  I want the script to be able to be run from a number of locations, so I can't just do:

# ~/foo/bar is the current dir
ln -s ~/foo/bar/baz ~/baz

I can do:

cp -l baz ~/baz

but it makes hard links.

I was thinking that I could either have zsh do this:
ln -s ./baz ~/baz

and have it automatically expand ./baz to it's full path name.  Or maybe there is some unix tool I don't know about.

Thanks for any tips at all!

I figured out one way to do it, but there may be a better way:

ln -s "$(pwd)/foo" ~/.foo

--
fREW Schmidt
http://blog.afoolishmanifesto.com


Messages sorted by: Reverse Date, Date, Thread, Author