NSPATCH(1)

πŸ“¦
version 1.85 Β· 3 versions
, in fedora 43

πŸ’– NSPATCH β€” the group chat manual page πŸ’–

okay so bestie, welcome to nspatch (that's the NSPATCH(1) page, and yes it's a User Contributed Perl thing, we love that for it). sit down, grab a strawberry πŸ“, and let me tell you about the little utility that runs nsdiff | nsupdate for you and actually handles the errors like a responsible main character.


✨ NAME ✨

nspatch β€” run nsdiff | nsupdate with error handling 🫢


🌸 SYNOPSIS 🌸

nspatch [-hVv] [-r count]
        -- [nsdiff options] -- [nsupdate options]

like. that's it. that's the whole vibe. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so the nspatch utility runs "nsdiff | nsupdate" and β€” this is the important part β€” it checks that both programs complete successfully. both of them. no slacking. πŸ‘‘

it suppresses their output unless there is an error, in a manner suitable for running from cron. which, yes, is giving "quiet kid in the back of the class who is secretly the smartest one here." no cap.

the nsupdate script produced by nsdiff includes a prerequisite check to detect and fail if there is a concurrent update. and these failures? they get detected by nspatch, which then retries the update. iconic behaviour fr fr. πŸ”₯

rather than using a pipe, nspatch uses temporary files to store the output of nsdiff and nsupdate. yes bestie, files. not a pipe. it said "i do my own thing." πŸ’€


πŸ’… OPTIONS πŸ’…

  • -h β€” Display this documentation. the classic "help me help you" move. πŸ“–
  • -V β€” Display version information. she's telling you who she is. πŸ’β€β™€οΈ
  • -r count β€” If the update fails because of a concurrent update, nspatch will retry up to count times. The default retry count is 2. so like, she'll try again, but she's not gonna try forever. boundaries. βœ‹
  • -v β€” Turn on verbose mode, so the output from nsdiff and nsupdate is printed even if they are successful. (By default it is suppressed.) the way that silence is the default and talking is opt-in… highkey relatable. πŸ™ˆ

the verbose option is passed on to nsdiff. If nspatch is not given the -v option, it passes the -v '' option to nsdiff. If nspatch is given the -v option, it passes the -v 'qr' option to nsdiff. (yes those quotes are real and yes you need them, don't come for me. 😭)


πŸŽ€ EXIT STATUS πŸŽ€

the nspatch utility returns 0 if no change is required or if the update is successful, or 1 if there is an error.

zero means "we ate, nothing to do, or we did it." one means "bestie something went wrong." that's the whole spectrum. 🌈


🧚 ENVIRONMENT 🧚

  • TMPDIR β€” Location for temporary files. that's where the temp files live. that's their home. respect it. 🏠

πŸ‘‘ VERSION πŸ‘‘

this is nspatch-1.85 <https://dotat.at/prog/nsdiff/>

written by Tony Finch <fanf2@cam.ac.uk> <dot@dotat.at> at Cambridge University Information Services. you may do anything with this. it has no warranty. ⭐


πŸ”₯ SEE ALSO πŸ”₯

nsdiff(1), nsupdate(1), cron(8)


and that's the page, bestie. go forth and update your DNS zones responsibly. no cap. πŸ’œ

okay final sign-off: this was the NSPATCH(1) page from perl v5.42.0, dated 2025-07-24. slay. πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from