Bash - Xargs (Standard input command execution)

Card Puncher Data Processing


wiki/xargs is an utility that takes the output of a command (ie standard input in a stream) to create arguments and execute commands. This command does not take in general a stream as argument).


  • remove file
find /path -type f -print | xargs rm
  • other example with hdfs
hdfs dfs -ls /path | grep -e pattern | awk '{print $8}' | xargs hdfs dfs -rm 

Discover More
Bash Liste Des Attaques Ovh
Bash - Command Execution

To execute a command in a script backticks in the same shell $( ) in a subshell from a string in a subshell from standard input See also: You can execute an expression inside an input...
Card Puncher Data Processing
How to replace in bulk a text in multiple file with a bash pipeline

An step by step that shows you how to create bash pipeline to replace in bulk text in files

Share this page:
Follow us:
Task Runner