NYPATCHY(1)
π nypatchy(1) β General Commands Manual, but make it a group chat
okay so bestie, welcome to nypatchy(1) from the General Commands Manual β yes it's a real one, yes it's giving "ancient CERN energy," but it's actually so useful once you get it. sit down, grab a snack, let's go π
β¨ NAME β¨
nypatchy β the tool for working with specialized-format patches. that's it, that's the whole vibe π
πΈ SYNOPSIS πΈ
nypatchy pam fort cradle print cc as data [ fort2 cc2 as2 data2 ]
like, yes, that's a lot of positional arguments and no, they're not optional-looking, but we'll walk through each one, don't panic π
π¦ DESCRIPTION π¦
nypatchy is literally the tool for working with Patchy Master Files (aka PAM files, iykyk).
so a PAM file is just an ordinary text file β generally it has a three-letter extension of .car (yes, car, don't ask) β and it holds source code interleaved with special pre-processing instructions that are meant for nypatchy itself. the source code in there can be in C, FORTRAN, assembly language, or honestly just a combo of all three if you're feeling chaotic π
the point of those pre-processing instructions is that you can keep separate optional patches maintained independently β for example when you've got architecture-specific code and you don't want one arch's patches bleeding into another. iconic behavior honestly π
now, the deets of all the pre-processing commands nypatchy uses? that is beyond the scope of this man page, bestie. the reader (you) should refer to the full manual available from CERN. I don't make the rules, I just relay them π«Ά
telling nypatchy which set of patches to use can be done on standard input or via a so-called cradle file. typically the cradle file contains one or more +USE statements as well as +EXE and +QUIT β for instance, in the case of the isajet Monte Carlo generator:
+USE,*ISAJET
+EXE
+PAM
+QUIT
that's the whole cradle. cute, right? β¨
β USAGE β
okay so in that command line from the synopsis: pam is the PAM file, if any. fort is the name of the primary output source code file, if any. cradle is the name of the cradle file, if any β and the default for that one is standard input, like a here-doc, for example. print is the name of the file that receives printed output (default is standard output). cc, as, data are the names of the source code output files for data types CC, AS, DATA. and the remaining parameters are the source code output files that receive diverted material for the respective data types FORT, CC, AS, DATA. slay, that's all of them π
you can omit parameters by substituting a dash - for them. and trailing parameters may be cut short by giving . or .go β the latter commences execution immediately rather than starting the nypatchy interactive prompt. so if you're not tryna chat with it, .go is your girl πββοΈ
β οΈ okay this part matters:nypatchyreturns a code of0to the shell if successful,1if there's a warning, and2if an error occurs. and here's the sneaky bit β since the program stops creating output but continues to run (in order to check for further errors) when an error occurs, you should be sure to test the error code$?after anynypatchyrun. like, don't just assume it worked because it didn't explode. check$?. periodt π
π₯ EXAMPLES π₯
one: read the cradle from a file and go immediately
nypatchy -- xyz .go
this reads the cradle (instructions) from file xyz.cra, which must list all the other files to be used. note that double dash doing its thing π
two: cradle via here-document
nypatchy .go << EOF
<cradle>
EOF
this one has the cradle given as a here-document. clean, simple, no files needed π¦
three: the full meal deal
nypatchy zebra.car zebra.fca zebra.cra zebra.lis .go
this reads the PAM file zebra.car, outputs the resulting source code to zebra.fca, takes the cradle from zebra.cra, and printing is done to zebra.lis. four files, one command, zero stress β¨
π SEE ALSO π
the whole friend group:
fcasplit(1)nycheck(1)nydiff(1)nyindex(1)nylist(1)nymerge(1)nyshell(1)nysynopt(1)nytidy(1)yexpand(1)
the reference manual for the Nypatchy suite of programs is available in compressed PostScript format at this URL:
http://wwwasdoc.web.cern.ch/wwwasdoc/psdir/p5refman.ps.gz
and if you're in a hurry, running the command nypatchy help .no also gives you some brief help on usage. lowkey the fastest way to get unstuck, ngl π
π AUTHOR π
this manual page was written by Kevin McCarty <kmccarty@debian.org> for the Debian GNU/Linux system (but it may be used by others β sharing is caring, bestie π«Ά). it is licensed under the GNU General Public License, version 2 or later (at your choice).
π COPYRIGHT π
Copyright (C) Kevin B. McCarty, 2008.
okay and finally, the cute sign-off: this page is dated Mar 12, 2008 and ships as part of the NYPATCHY(1) manual page, General Commands Manual edition. it's old, it's iconic, it still works. go check your $? and text your friends πβ¨π
π¦ 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