logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

runargs.8 (2638B)


  1. .\" runargs.8
  2. .\" wcm, 2009.12.11 - 2009.12.15
  3. .\" ===
  4. .TH runargs 8 "January 2013" "runtools-2.07" "runtools"
  5. .SH NAME
  6. runargs \- run a program with arguments read from an argument file
  7. .SH SYNOPSIS
  8. .B runargs [\-hV] [\-i]
  9. .I argfile program
  10. .B [
  11. .I args ...
  12. .B ]
  13. .SH DESCRIPTION
  14. .B runargs
  15. runs
  16. .I program
  17. with arguments read from
  18. .IR argfile .
  19. .PP
  20. An
  21. .I argfile
  22. is a plain text file with zero or more lines.
  23. Each line read is setup as an individual argument to
  24. .I program
  25. in the same order as it is read.
  26. Any leading and/or trailing whitespace is trimmed.
  27. Empty lines and lines beginning with the `#' character are ignored.
  28. .PP
  29. If
  30. .I argfile
  31. is given as a
  32. .RB ` - '
  33. character,
  34. arguments will be taken from stdin.
  35. .PP
  36. Normally any arguments specified in
  37. .I args
  38. are setup to precede the arguments taken from
  39. .IR argfile .
  40. The
  41. .B \-i
  42. option may be used to invert this order.
  43. .PP
  44. If
  45. .I program
  46. does not contain a ``/'' slash character,
  47. .B runargs
  48. will perform a shell-like search for the executable using the
  49. .B PATH
  50. variable in the current environment.
  51. .SH OPTIONS
  52. .TP
  53. .B \-h
  54. Help.
  55. Print a brief usage message to stderr and exit.
  56. .TP
  57. .B \-i
  58. Insert.
  59. Normally
  60. .B runargs
  61. sets up
  62. .I program
  63. with any arguments given in
  64. .I args
  65. before those given in
  66. .IR argfile .
  67. The
  68. .B \-i
  69. option may be used to invert this order,
  70. and insert the arguments taken from
  71. .I argfile
  72. before any specified in
  73. .IR args .
  74. .TP
  75. .B \-V
  76. Version.
  77. Print the version number to stderr and exit.
  78. .SH EXIT STATUS
  79. .B runargs
  80. exits with one of the following values:
  81. .TP
  82. 0
  83. .I program
  84. was invoked and completed successfully.
  85. In this case,
  86. the exit code is returned by the
  87. .IR program ,
  88. rather than by
  89. .B runargs
  90. itself.
  91. .TP
  92. 100
  93. .B runargs
  94. failed because of a usage error,
  95. such as an invalid command\-line option or argument.
  96. In this case,
  97. .B runargs
  98. prints a brief error message and usage help to stderr on exit.
  99. .TP
  100. 111
  101. .B runargs
  102. failed due to some system or resource error.
  103. In this case,
  104. .B runargs
  105. prints a brief diagnostic message to stderr on exit.
  106. .TP
  107. 1\-127
  108. .I program
  109. was invoked and failed with its own non-zero exit status.
  110. .SH CAVEATS
  111. In most cases,
  112. the arguments specified in
  113. .I argfile
  114. will not normally want to follow the shell\-protecting quoting conventions
  115. as might otherwise be used
  116. when running
  117. .I program
  118. in a shell environment.
  119. .SH AUTHOR
  120. Wayne Marshall, http://b0llix.net/perp/
  121. .SH SEE ALSO
  122. .nh
  123. .BR runtools_intro (8),
  124. .BR runargv0 (8),
  125. .BR runchoom (8),
  126. .BR rundetach (8),
  127. .BR rundeux (8),
  128. .BR runenv (8),
  129. .BR runfile (8),
  130. .BR runlimit (8),
  131. .BR runlock (8),
  132. .BR runpause (8),
  133. .BR runsession (8),
  134. .BR runtool (8),
  135. .BR runtrap (8),
  136. .BR runuid (8)
  137. .\" EOF