logo

utils

Old programs, got split in utils-std and utils-extra git clone https://hacktivis.me/git/utils.git

args.c (407B)


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