[comp.sys.ibm.pc] MKS BUG or FEATURE

jjones@anuck.UUCP (jeff jones) (10/24/88)

	This is my first posting, so I hope I got the right newsgroup and
hope this works...

	I'm using a software package called Avocet Toolkit version 2.21??,
which is a licensed seller of the MKS Toolkit...as a matter of fact, it
says copyright by MKS inside the cover.  I LOVE this package and use it
to its fullest capabilities...configuration 4?.  COMMAND.COM isn't even
loaded.  Anyways, I have a couple of technical questions for all you MKS
gurus out there.

	PROBLEM 1:  I'm writing a shell-script that looks in a directory
and gets a list of *.log files based on age using the -t option to ls.
In the following example, the first echo/sed line outputs the first file
in the list as expected, but the second echo/sed won't load the variable
correctly.  Am I doing something wrong or is there a BUG in MKS?  If it
matters, the login profile.ksh performs an alias ls="ls -xp", and there
are 4 .log files contained in the directory.

	LOG=c:/sys/backlog				#where to execute the commands
	list=`ls -t $LOG/*.log`			#get file list sorted by age

	#this works...outputs first file in the list
	echo $list | sed 's/ .*$//'

	#this DOESN'T work.
	first_file=`echo $list | sed 's/ .*$//'`
	echo $first_file


	PROBLEM 2:  These scripts are/will be used to perform regular
backups of any files newer than the last backup.log file, hence
PROBLEM 1.  The backup is performed with cpio, but then I would like
to PACK the file prior to moving it to floppy.  Pack, however, seems
to crash and burn (system hang) if there are any .exe files in the cpio
output file.  Any clues?  As a test, copy sh.exe to some temporary
place and try to pack it...it will hang, at least in my case.  The
following shell-script is what I would LIKE to do...part of PROBLEM 1's
shell script:

	#this backs up new changes to a cpio file
	find c:/ -type f -newer $first_file -print |
			cpio -ov > $LOG/backup.bak 2>$LOG/backup.log

	#attempt to pack it
	pack $LOG/backup.bak

	Also, I can't seem to use pack in a pipe, such as piping the above
find/cpio script into pack.
	BTW, I don't use the -cpio switch for find because it uses the
5120 byte buffers instead of the 512, resulting in a bit larger cpio file.

	You can email responses.
							Thank You,
							Jeffrey R. Jones
							jjones@mvuxi.att.com
								or
							att!anuxm!anuck!jjones
							508-691-3264