Date: Sun, 24 Aug 1997 18:19:04 RST From: ark AT mpak DOT convey DOT ru (-= ArkanoiD =-) Reply-To: ark AT mpak DOT convey DOT ru Message-Id: <271@mpak.convey.ru> To: jims AT eos DOT arc DOT nasa DOT gov Cc: opendos AT delorie DOT com Subject: Re: softlink TSR driver Organization: International Brownian Movement Lines: 100 MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Precedence: bulk nuqneH, In message <199708231330 DOT GAA06099 AT eos DOT arc DOT nasa DOT gov> "Jim Stevenson Ph.D" writes: > What does this driver do? > It provides functionality similar to Unix symlinks feature. Here are utilities to make it easier to use: ------------cut------------ln.bat------ @echo off rem rem Poor man's ln - for those who still use command.com/4dos - style rem command language. rem rem Note: " " is not "=",it is ascii code 205 (CDh) rem if not exist %2 echo   %1 > %2 if exist %2 echo File exists. ------------cut------------ln.bat------ ------------cut------------ln.sh------- #!/bin/psh # # ln utility for OpenDOS (Caldera) and Unixlink (Andrzej Novosiolov) # Version 0.00alpha # # (C) Copyright 1997 ArkanoiD (Cereus Software) # # Runs under Polytron shell, requires minor modifications to work with # bash/ksh/ms_sh etc. # _lastarg=`echo $* | cut -f $# -d " "` 2>/dev/null USAGE="USAGE:\nln [-vfs] file link\nln [-vfs] file [file..] directory" _flags=- while echo "$1" | grep "^-" > /dev/null do if echo "$1" | grep "[^vfs-]" > /dev/null then echo -u2 "ln: invalid flag\n" echo $USAGE exit 1 else echo "$1" | grep v > /dev/null; _verbose=$?; _flags=${_flags}v echo "$1" | grep f > /dev/null; _force=$? ; _flags=${_flags}f echo "$1" | grep s > /dev/null; _symlink=$?; _flags=${_flags}s shift fi done if [ $# -lt 2 ] then echo -u2 "ln: invalid number of parameters" echo $USAGE exit 1 fi if [ -d $_lastarg ] then echo $_lastarg for _file in $* do ln $_flags $_file $_lastarg/$_file done else test $# -lt 3 || ( echo "ln: ${_lastarg}: not a directory" ; exit 1 ) if [ -f $1 ] then test -f $2 && if [ $_force -eq 0 ] then rm -f $2 else echo -u2 "ln: $2: file exists" exit 3 fi test $_verbose -ne 0 || echo "ln: $1 -> $2" if [ $_symlink -eq 0 ] then echo -n "\315 "$1 >$2 else echo -n "\315 " >$2 command /c truename $1 >> $2 fi else echo -u2 "ln: $1 does not exist" exit 3 fi fi ------------cut------------ln.sh------- -- _ _ _ _ _ _ _ Must be a visit from the dead.. _| o |_ | | _|| | / _||_| |_ |_ |_ CU in Hell .......... Arkan#iD |_ o _||_| _||_| / _| | o |_||_||_|