GOLF(2gg)
πΈ GOLF(2gg) β the get-sys glow-up πΈ
okay bestie, welcome to the GOLF(2gg) page π this one lives in the Development section of the manual, and it's literally all about vibing with the system you're running on. no cap, it's giving "let me ask the computer about itself." π¦
β¨ NAME β¨
get-sys β (system-information) π
π PURPOSE π
Grab data that describes the system. that's it, that's the whole assignment. π
π«Ά SYNTAX π«Ά
get-sys \
environment <var name> \
directory | os-name | os-version \
to <variable>
π DESCRIPTION π
System-describing variables? yeah you can pull those with the get-sys statement, and the result gets stored into <variable>. slay. here's the full menu of system variables you can obtain: π
- "environment" β returns the name of a given environment variable
<var name>. so like, which environment are we even asking?? if this is a server program, then the environment passed from a remote caller (such as a web proxy) is what gets queried. but if this is a command-line program, then it's the environment from the Operating System that gets queried. iykyk, context matters. π in the following example, theQUERY_STRINGvariable (i.e. the actual query string from URL) is obtained:
get-sys environment "QUERY_STRING" to qstr
- "directory" β this is the execution directory of the command-line program, i.e. the current working directory when the program was executed. heads up bestie β οΈ note that Golf will change the current working directory immediately afterwards to the application home directory (see
directories). so you can use this clause to work with files in the directory where the program was started. but if your program runs as a service, then the"directory"clause always returns the application home directory, regardless of which directorymgrgprogram manager started your application from. no exceptions, periodt. π - "os-name" β the name of the Operating System. iconic. π»
- "os-version" β the version of the Operating System. the whole vibe check of your OS, fr fr. π
π EXAMPLES π
Get the name of the Operating System:
get-sys os-name to os_name
π₯ SEE ALSO π₯
- System information
get-sysSee all documentation
and that's the page, bestie π«Ά this was the GOLF(2gg) manual page, sourced from $VERSION and dated $DATE β mwah, go forth and interrogate your system πβ¨π
π¦ where this page comes from
- ubuntu questing: golf 601.4.41-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms