Path: utzoo!attcan!uunet!husc6!mailrus!ncar!tank!nic.MR.NET!rhesus!bin From: bin@primate.wisc.edu (Brain in Neutral) Newsgroups: comp.sources.wanted Subject: Re: "Safe" unshar Message-ID: <440@rhesus.primate.wisc.edu> Date: 25 Nov 88 17:32:47 GMT References: <1240@vsi1.UUCP> Organization: UW-Madison Primate Center Lines: 23 From article <1240@vsi1.UUCP>, by lmb@vsi1.UUCP (Larry Blair): > I'm looking for a version of unshar that does not execute the file it is > unshar'ing. The version that I last pulled of the net ultimately passes > the file to sh for execution. What is it supposed to do, then? Just print the commands it thinks it's supposed to execute? You could use Brandon Allbery's uns and change sh to sh -nv: #!/bin/sh #: uns -- unpack shell archives (named or on stdin) if test -z "$*"; then set x -; shift 1; fi for arg in "$@"; do echo "shar: unpacking ${arg}" sed -e '1,/^[:#]/d' "$arg" | sh -nv done But the problem is that the here-files are also printed as sh is going through them... Paul DuBois dubois@primate.wisc.edu rhesus!dubois bin@primate.wisc.edu rhesus!bin