/usr/bin/yexpand is in nypatchy 20061220+dfsg3-4.2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #!/bin/sh
# **********************************************************************
#@(#) * yexpand $Header: /afs/cern.ch/asis/share/cern/CVS/patchy/yexpand.script,v 1.2 2005/04/18 15:23:11 mclareni Exp $
# * *
# * Expand environment variables in PATCHY cradles *
# * *
# * Author: M.Marquina 91/12/10 *
# * Mods Date Commments *
# * M.Marquina 92/03/11 Display syntax if no arguments are given *
# * Place by default the output in ./, exit with rc*
# * M.Marquina 93/12/09 Prefix always CERN_ROOT with ":" in order to *
# * get ypatchy respecting the pam-filename case *
# * 93/12/21 Translate CERN_ROOT as CERN/CERN_LEVEL in order*
# * to use the correct LEVEL in the cradle *
# * G.Folger 94/09/26 make .yexp script run in /bin/sh.
# * *
# **********************************************************************
if [ $# -eq 0 ] ; then
echo "usage: yexpand input_cradle [output_cradle]"
exit
fi
ifile=$1
tfile=`echo $ifile | awk -F/ '{ print $NF }'`
[ $# -eq 1 ] && ofile=$tfile || ofile=$2
# CERN_ROOT=":$CERN_ROOT" ; export CERN_ROOT
CERN_ROOT=":$CERN/$CERN_LEVEL" ; export CERN_ROOT
tfile="./$tfile.yexp"
echo "#! /bin/sh" >$tfile
echo " cat <<EOI" >>$tfile
cat <$ifile >>$tfile
cc=$?
echo "EOI" >>$tfile
chmod a+x $tfile
$tfile >$ofile
rm $tfile
exit $cc
|