logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git

args.c (431B)


  1. // Collection of Unix tools, comparable to coreutils
  2. // SPDX-FileCopyrightText: 2017-2022 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. //
  4. // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
  5. #define _POSIX_C_SOURCE 200809L
  6. // printf()
  7. #include <stdio.h>
  8. int
  9. main(int argc, char *argv[])
  10. {
  11. printf("argc: %i\n", argc);
  12. for(int i = 0; i < argc; i++)
  13. {
  14. printf("argv[%d]: \"%s\"\n", i, argv[i]);
  15. }
  16. return 0;
  17. }