---
name: "function::cmdline_arg"
section: "3stap"
platform: "linux"
package: "systemtap-doc"
version: "5.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/function::cmdline_arg"
---

# function::cmdline\_arg(3stap)

Fetch a command line argument

## NAME

function::cmdline\_arg - Fetch a command line argument

## SYNOPSIS

```
    cmdline_arg:string(n:long)
```

## ARGUMENTS

*n*

Argument to get (zero is the program itself)

## DESCRIPTION

Returns argument the requested argument from the current process or the empty string when there are not that many arguments or there is a problem retrieving the argument. Argument zero is traditionally the command itself.

## SEE ALSO0

[*tapset::context*(3stap)](/tapset::context/3stap.md)
