About 50 results
Open links in new tab
  1. Why does argv include the program name? - Unix & Linux Stack …

    Oct 12, 2016 · 119 Typical Unix/Linux programs accept the command line inputs as an argument count (int argc) and an argument vector (char *argv[]). The first element of argv is the program name - …

  2. How to get argv[0] in bpftrace? - Unix & Linux Stack Exchange

    Sep 19, 2023 · How to get argv [0] in bpftrace? Ask Question Asked 2 years, 4 months ago Modified 2 years, 1 month ago

  3. ARGV [] not accepting the argument - Unix & Linux Stack Exchange

    Nov 17, 2023 · ARGV [] not accepting the argument Ask Question Asked 1 year, 11 months ago Modified 1 year, 11 months ago

  4. How can I pass a command line argument into a shell script?

    Feb 10, 2012 · The shell command and any arguments to that command appear as numbered shell variables: $0 has the string value of the command itself, something like script, ./script, …

  5. filenames - Systemd service prefix on ExecStart=@/path/to/executable ...

    If the executable path is prefixed with "@", the second specified token will be passed as "argv [0]" to the executed process (instead of the actual filename), followed by the further arguments specified. But …

  6. bash - Is `argv [0]` of `execve ()` required to be the same as the ...

    argv [0] of execve corresponds to argv[0] in the main function of the new program, and is thus typically the same as the basename component of the pathname argument.

  7. Changing argv [0] from the command line - Unix & Linux Stack Exchange

    Jan 16, 2020 · With something being, depending on the system either /path/to/interpreter or argv0 (the former on Linux). And interpreters, when exposing arg lists in their API, expose the argument list of …

  8. How to pass variable arguments to expect - Unix & Linux Stack Exchange

    Mar 5, 2021 · I want to pass a variable number of arguments to a expect script: #!/usr/bin/expect set timeout 10 spawn ssh -o "StrictHostKeyChecking no" [lindex $argv 0]@ [lindex $argv 2] expect "

  9. Command line argument in awk - Unix & Linux Stack Exchange

    Oct 12, 2018 · You've confused Awk command line arguments (which must be read from the ARGV array) with Bash / Bourne shell positional parameters ($1, $2, and so on). Awk uses $1, $2, and so …

  10. Command, args and process name - Unix & Linux Stack Exchange

    Jul 5, 2021 · Most of the exec functions receive at least two arguments, where the first is the the path to the executable and the second is the list of arguments. That list includes argv[0], so the programmer …