1 2 3 4 5 6 7 8 9 10 11
#!/bin/sh -eu targetdir=$1 shift target=$1 shift for file in "$@"; do rm -f "$targetdir/$file" ln -s "$target" "$targetdir/$file" done