Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux use lines from file in command

# Basic syntax:
xargs -a file_to_read -I {} command {}
# Where:
#	- -a tells xargs to reads items from file_to_read instead of stdin.
#	- -I specifies a string that will be replaced by the stdin when found.
#		This is useful for controlling where the read content appears in the
#		xargs command
# Note, it's often useful to use this in conjunction with -n 1 and -P # which
#	causes xargs to run the commands in parallel using # processes
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #linux #lines #file #command
ADD COMMENT
Topic
Name
3+4 =