YEXPAND(1)
π yexpand(1) β General Commands Manual π
okay bestie, welcome to the yexpand(1) page, straight out of the General Commands Manual β¨
πΈ NAME πΈ
yexpand β a tool to expand environment variables in Nypatchy cradles π§
β SYNOPSIS β
yexpand inputfile [ outputfile ]
π DESCRIPTION π
so yexpand is, and I cannot stress this enough, a very simple script π₯ its whole job is to expand environment variables inside a text file into their current values from the shell environment. that's it, that's the gig π
it was written to be used with nypatchy cradles, periodt. and honestly? the author is literally begging you: do not try to use it for anything else π (go look at BUGS below, it's giving cautionary tale π).
π¦ USAGE π¦
okay so here's the whole vibe:
yexpandtakes inputfile as input π₯- it replaces all instances of shell variables β written in the form
$VARIABLEor${VARIABLE}β with their current values in the environment π - and it saves the result to outputfile πΎ
- undefined variables? they get replaced with the empty string, no questions asked π
- if outputfile isn't given, the result gets saved to the current directory instead, as a file with the same name as inputfile π
- which means... an input file sitting in the current directory will be overwritten π
like, actually overwritten. main character energy but make it destructive π«Ά
π BUGS π
bestie. buckle up. this script is very simple-minded π§ β¨
since it basically just echoes its input file as a here-doc, it will attempt to perform all types of shell substitution (command substitution, etc.) β not just variable substitution π₯ so yeah, it's likely to fail on anything except the very simplest text files π ngl that's a whole mood.
additionally, this script creates a temporary file π the file is created in the current directory, so there should not be security implications πΈ but heads up: any existing file named file.yexp (where file is the basename of inputfile) in the current directory will be overwritten and then deleted ππ
fr fr, check your directory before you run this, i'm literally begging π
π SEE ALSO π
fcasplit(1), nycheck(1), nydiff(1), nyindex(1), nylist(1), nymerge(1), nypatchy(1), nyshell(1), nysynopt(1), nytidy(1)
the reference manual for the Nypatchy suite of programs is available in compressed PostScript format at the following URL:
http://wwwasdoc.web.cern.ch/wwwasdoc/psdir/p5refman.ps.gz
π AUTHOR π
this manual page was written by Kevin McCarty <kmccarty@debian.org> for the Debian GNU/Linux system (but may be used by others) π«Ά it is licensed under the GNU General Public License, version 2 or later (at your choice) β
π COPYRIGHT π
Copyright (C) Kevin B. McCarty, 2008.
and that's the whole page, bestie β¨ written up and dated Mar 12, 2008 β iconic, timeless, lowkey legendary π π¦
π¦ where this page comes from
- nixos 26.05: cernlib 2025.09.18.4
- nixpkgs unstable: cernlib 2025.09.18.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms