AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
XARGS(l) XARGS (l) -nnumber Execute command using as many standard input arguments as possible, up to number arguments maximum. Fewer arguments will be used if their total size is greater than size characters, and for the last invocation if there are fewer than number arguments remaining. If option -x is also coded, each number arguments must fit in the size limitation, �. 1 else xargs terminates execution. -t Trace mode: the command and each constructed argument list are echoed to file descriptor 2 just prior to their execution. -p Prompt mode: the user is asked whether to execute command each invocation. Trace mode ( -t) is turned on to print the command instance to be executed, followed by a T. • • prompt. A reply of y (optionally followed by anything) will execute the command; anything else, including just a carriage -X -ssize -eeofstr return, skips that particular invocation of command. Causes xargs to terminate if any argument list would be greater than size characters; -x is forced by the options -i and -1. When neither of the options -i, -1, or -n are coded, the total length of all arguments must be within the size limit. The maximum total size of each argument list is set to size characters; size must be a positive integer less than or equal to 470. If -s is not coded, 470 is taken as the default. Note that the character count for size includes one extra character for each argument and the count of characters in the command name. Eofstr is taken as the logical end-of-file string. Underbar ( _ ) is assumed for the logical EOF string if -e is not coded. -e with no eofstr coded turns off the logical EOF string capability (underbar is taken literally). Xargs reads standard input until either end-of-file or the logical EOF string is encountered. Xargs will terminate if it receives a return code of -1 from, or if it cannot execute, command. When command is a shell program, it should explicitly exit (see sh(1)) with an appropriate value to avoid accidentally returning with -1. EXAMPLES The following will move all files from directory $1 to directory $2, and echo each move command just before doing it: Is $1 I xargs -i -t mv $1/{ } $2/{ } The following will combine the output of the parenthesized commands onto one line, which is then echoed to the end of file log: (logname; date; echo $0 $*) I xargs >>log - 2- �
XARGS ( 1) XARGS ( l ) The user is asked which files in the current directory are to be archived and archives them into arch (1.) one at a time, or (2.) many at a time. 1. Is I xargs -p -1 ar r arch 2. Is I xargs -p -1 I xargs ar r arch The following will execute diff(I) with successive pairs of arguments originally typed as shell arguments: echo $* I xargs -n2 diff DIAGNOSTICS Self explanatory. - 3-
- Page 592 and 593: !�
- Page 595 and 596: UMODEM(l) UMODEM (l) NAME umodem -
- Page 597 and 598: UNAME(l) UNAME(l) NAME uname - prin
- Page 599: UNGET ( l ) UNGET ( l ) NAME unget
- Page 602 and 603: � \.,_ .:1 :� \__. ·
- Page 605 and 606: UUCP {IC) UUCP {IC) NAME uucp, uulo
- Page 607 and 608: UUSTAT (IC) UUSTAT ( IC ) NAME uust
- Page 609 and 610: UUTO (lC} UUTO (lC} NAME uuto, uupi
- Page 611 and 612: UUX ( lC ) UUX ( lC ) NAME uux - UN
- Page 613 and 614: VAL(l) VAL(I) NAME val - validate s
- Page 615 and 616: VC (l) VC (l) NAME vc - version con
- Page 617: VC (l) VC ( l ) ::text Used for key
- Page 620 and 621: VI ( 1) vi file vi vi + n file vi +
- Page 622 and 623: VI (l) rn OAD Av MODIFYING TEXT Cha
- Page 624 and 625: VI ( 1 ) VI( 1) file to newtext :gf
- Page 626 and 627: VI (l) VI (l) :set x? Show value of
- Page 628 and 629: VI (l) VI ( 1) mapped to I, then if
- Page 630 and 631: VI (l) VI (l) won't be broken. Inse
- Page 632 and 633: � I . .... .,_ J _ . . ·
- Page 634 and 635: .. \ '-�� -·
- Page 637 and 638: WIIO (I) WHO(l) NAME who - who is o
- Page 639: WRITE ( l ) WRITE ( l ) NAME write
- Page 645 and 646: YACC { I ) YACC { l ) NAME yacc - y
- Page 647 and 648: INTRO ( 2) INTR0 ( 2 ) NAME intro -
- Page 649 and 650: INTRO ( 2) INTR0 (2) 21 EISDffi Is
- Page 651 and 652: INTRO (2) INTRO ( 2) ProcO is the s
- Page 653 and 654: INTR0 (2) INTR0 (2) permission requ
- Page 655 and 656: INTR0 (2) time_t shm_dtime; time_t
- Page 657: ACCESS (2} ACCESS (2} NAME access -
- Page 661 and 662: ALARM (2) ALARM (2) NAME alarm - se
- Page 663: BRK(2) BRK ( 2 ) NAME brk, sbrk - c
- Page 667 and 668: CHMOD (2) CHMOD (2) NAME chmod - ch
- Page 669: CHOWN(2) CHOWN(2) NAME chown - chan
- Page 673 and 674: CLOSE ( 2) CLOSE (2) NAME close - c
- Page 675 and 676: CREAT ( 2 ) CREAT ( 2 ) NAME creat
- Page 677 and 678: DUP (2) DUP (2) NAME dup - duplicat
- Page 679 and 680: EXEC (2) EXEC (2) NAME execl, execv
- Page 681: EXEC (2) EXEC (2) Search perm1ss10n
- Page 684 and 685: EXIT (2) EXIT (2) WARNING See WARNI
- Page 686 and 687: FCNTL (2) FCNTL (2) immediately wit
- Page 689 and 690: FORK(2) FORK(2) NAME fork - create
- Page 691: GETPID ( 2} GETPID (2) NAME getpid,
XARGS(l) XARGS (l)<br />
-nnumber Execute command using as many standard input<br />
arguments as possible, up to number arguments<br />
maximum. Fewer arguments will be used if their<br />
total size is greater than size characters, and for the<br />
last invocation if there are fewer than number arguments<br />
remaining. If option -x is also coded, each<br />
number arguments must fit in the size limitation, �. 1<br />
else xargs terminates execution.<br />
-t Trace mode: the command and each constructed<br />
argument list are echoed to file descriptor 2 just<br />
prior to their execution.<br />
-p Prompt mode: the user is asked whether to execute<br />
command each invocation. Trace mode ( -t) is<br />
turned on to print the command instance to be executed,<br />
followed by a T. • • prompt. A reply of y<br />
(optionally followed by anything) will execute the<br />
command; anything else, including just a carriage<br />
-X<br />
-ssize<br />
-eeofstr<br />
return, skips that particular invocation of command.<br />
Causes xargs to terminate if any argument list<br />
would be greater than size characters; -x is forced<br />
by the options -i and -1. When neither of the<br />
options -i, -1, or -n are coded, the total length of<br />
all arguments must be within the size limit.<br />
The maximum total size of each argument list is set<br />
to size characters; size must be a positive integer<br />
less than or equal to 470. If -s is not coded, 470 is<br />
taken as the default. Note that the character count<br />
for size includes one extra character for each argument<br />
and the count of characters in the command<br />
name.<br />
Eofstr is taken as the logical end-of-file string.<br />
Underbar ( _ ) is assumed for the logical EOF string<br />
if -e is not coded. -e with no eofstr coded turns off<br />
the logical EOF string capability (underbar is taken<br />
literally). Xargs reads standard input until either<br />
end-of-file or the logical EOF string is encountered.<br />
Xargs will terminate if it receives a return code of -1 from, or if<br />
it cannot execute, command. When command is a shell program,<br />
it should explicitly exit (see sh(1)) with an appropriate value to<br />
avoid accidentally returning with -1.<br />
EXAMPLES<br />
The following will move all files from directory $1 to directory $2,<br />
and echo each move command just before doing it:<br />
Is $1 I xargs -i -t mv $1/{ } $2/{ }<br />
The following will combine the output of the parenthesized commands<br />
onto one line, which is then echoed to the end of file log:<br />
(logname; date; echo $0 $*) I xargs >>log<br />
- 2-<br />
�