ATF-SH(1)
β¨ ATF-SH(1) β¨
ok so bestie, welcome to the manual page for atf-sh, which lives in the General Commands Manual section (section 1, obvs π
).
π NAME π
atf-sh β the interpreter for shell-based test programs. that's literally it. she runs your shell test scripts and she's iconic for it π
πΈ SYNOPSIS πΈ
atf-sh [-s shell] script
π¦ DESCRIPTION π¦
so here's the tea β β atf-sh is an interpreter that runs the test program you hand it in script, right after it loads up the atf-sh(3) library. slay.
but ngl, atf-sh is not a real interpreter. like, not even a little. she's just a wrapper around the system-wide shell that's defined by ATF_SHELL. that's the whole vibe π
what she actually does: atf-sh executes the interpreter, loads the atf-sh(3) library, and then runs the script. and you must consider atf-sh to be a POSIX shell by default, so bestie... do not be using any non-standard extensions, okay? she said POSIX and she meant it π«Ά
the following options are available:
-sshell β specifies the shell to use instead of the value provided byATF_SHELL. yes, you get to choose β¨
π ENVIRONMENT π
ATF_LIBEXECDIRβ overrides the builtin directory whereatf-shis located. π Should not be overridden other than for testing purposes. like, seriously. leave her alone.ATF_PKGDATADIRβ overrides the builtin directory wherelibatf-sh.subris located. also should not be overridden other than for testing purposes. same energy, same warning πATF_SHELLβ path to the system shell to be used in the generated scripts. and listen up: scripts must not rely on this variable being set to select a specific interpreter. no cap. don't do it. π
π EXAMPLES π
scripts using atf-sh(3) should start with:
#! /usr/bin/env atf-sh
ok but what if you want to explicitly choose a shell interpreter? π well, plot twist: you cannot rely on env(1) to find atf-sh. nope. instead, you have to hardcode the path to atf-sh in the script, and then use the -s option afterwards as a single parameter:
#! /path/to/bin/atf-sh -s/bin/bash
see how that works? hardcoded path, then -s glued to the shell. it's giving main character energy honestly π
β¨
π SEE ALSO π
and that's the whole page, bestie β every last flag, every env var, every warning, all of it. you're so welcome π«Ά
this one comes from the Debian crew, dated September 27, 2014, and it's filed under ATF-SH(1) in the General Commands Manual. periodt. πβ¨πΈπ¦π
π¦ where this page comes from
- alpine 3.22: atf-doc 0.23-r0 Β· BSD-2-Clause AND BSD-3-Clause
- alpine 3.23: atf-doc 0.23-r0 Β· BSD-2-Clause AND BSD-3-Clause
- alpine 3.24: atf-doc 0.23-r0 Β· BSD-2-Clause AND BSD-3-Clause
- debian trixie: atf-sh 0.22-3 Β· BSD-2-Clause
- fedora 43: libatf-sh 0.23-2.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: libatf-sh 0.23-4.fc44 Β· LicenseRef-Callaway-BSD
- nixos 26.05: atf 0.23
- nixpkgs unstable: atf 0.23
- ubuntu questing: atf-sh 0.22-3
- ubuntu resolute: atf-sh 0.22-3build1 Β· BSD-2-Clause
- ubuntu stonking: atf-sh 0.22-3build1 Β· BSD-2-Clause
- Copyright (c) 2010 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms