mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Posixize:
sh -c [-aCefinuvx] command_string [ command_name [argument ...] ] 1 4.56.3 Options -c Read commands from the command_string operand. Set the value of special parameter 0 (see 3.5.2) from the value of the command_name operand and the positional parameters ($1, $2, etc.) in sequence from the remaining argument operands. Pointed out by: Kaleb Keithly (kaleb@x.org)
This commit is contained in:
parent
5dde8b2750
commit
6d753bdd67
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11111
@ -33,7 +33,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: options.c,v 1.3 1995/05/30 00:07:21 rgrimes Exp $
|
||||
* $Id: options.c,v 1.4 1995/08/06 19:35:33 joerg Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -106,6 +106,9 @@ procargs(argc, argv)
|
||||
commandname = arg0 = *argptr++;
|
||||
setinputfile(commandname, 0);
|
||||
}
|
||||
if (minusc)
|
||||
/* Posix.2: first arg after -c cmd is $0, remainder $1... */
|
||||
arg0 = *argptr++;
|
||||
shellparam.p = argptr;
|
||||
/* assert(shellparam.malloc == 0 && shellparam.nparam == 0); */
|
||||
while (*argptr) {
|
||||
|
Loading…
Reference in New Issue
Block a user