1YEXPAND(1)                  General Commands Manual                 YEXPAND(1)
2
3
4

NAME

6       yexpand - tool to expand environment variables in Nypatchy cradles
7

SYNOPSIS

9       yexpand inputfile [ outputfile ]
10

DESCRIPTION

12       yexpand  is  a  very simple script to expand environment variables in a
13       text file to their current values in the  shell  environment.   It  was
14       written  to  be  used with nypatchy cradles.  It is recommended you not
15       try to use it for any other purposes (note BUGS below).
16

USAGE

18       yexpand takes inputfile as input, replaces all instances of shell vari‐
19       ables  (in the form $VARIABLE or ${VARIABLE}) with their current values
20       in the environment, and saves  the  result  to  outputfile.   Undefined
21       variables  are  replaced  with  the empty string.  If outputfile is not
22       given, the result is instead saved to the current directory as  a  file
23       of  the  same  name  as  inputfile.   Thus an input file in the current
24       directory will be overwritten.
25

BUGS

27       This script is very simple-minded.  Since it basically just  echos  its
28       input file as a here-doc, it will attempt to perform all types of shell
29       substitution (command substitution, etc.) as well as variable substitu‐
30       tion.   Hence it is likely to fail on anything except the very simplest
31       text files.
32
33       Additionally, this script creates a temporary file.  The file  is  cre‐
34       ated in the current directory, so there should not be security implica‐
35       tions.  However, any existing file named file.yexp (where file  is  the
36       basename of inputfile) in the current directory will be overwritten and
37       then deleted.
38

SEE ALSO

40       fcasplit(1), nycheck(1), nydiff(1), nyindex(1), nylist(1),  nymerge(1),
41       nypatchy(1), nyshell(1), nysynopt(1), nytidy(1)
42
43       The reference manual for the Nypatchy suite of programs is available in
44       compressed PostScript format at the following URL:
45       http://wwwasdoc.web.cern.ch/wwwasdoc/psdir/p5refman.ps.gz
46

AUTHOR

48       This manual page was written by Kevin McCarty <kmccarty@debian.org> for
49       the  Debian  GNU/Linux  system  (but  may  be  used  by others).  It is
50       licensed under the GNU General Public License, version 2 or  later  (at
51       your choice).
52
54       Copyright (C) Kevin B. McCarty, 2008.
55
56
57
58                                 Mar 12, 2008                       YEXPAND(1)
Impressum