xargs is a command that executes another command and generates its arguments from stdin

learn more… | top users | synonyms

1
vote
2answers
38 views

Is there a means of manipulating the order of arguments of stdin when using xargs, much like how awk as $0,$1,$2,etc..?

I'm trying to learn how to manipulate pipe flow using xargs. Often times I need the output of my commands to be fed into commands that can't be piped into by stdout. awk seems to have some ...
1
vote
1answer
54 views

Sending a list (text file) of files and pathnames to xargs

I have a file that contains the paths of various files. files.txt : /path/to/file1.txt /path/to/file2.txt ... /path/to/fileN.txt I want to use it in a script to process the files. cat files.txt | ...
1
vote
1answer
133 views

Why does xargs -I imply -L 1

I've seen Why does 'find -exec cmd {} +' need to end in '{} +'? which explains why {} + has to be at the end of the -exec cmd(*), and now I'd like to know why GNU xargs reverts to one ...
0
votes
1answer
36 views

Using xargs to construct a find command that excludes a list of directories from an environment variable

I know how to exclude certain directories from find: find <path> ! -path <path to exclude>. But this can be too tedious to type out when I need to exclude a lot of directories or simply ...
0
votes
1answer
59 views

Problem using xargs to send commands to a screen from within a bash script

I'm currently writing a simple bash script for recording a streaming radio stream. The logistics of getting into work and getting set up mean that I miss about 30 minutes of my favourite breakfast ...
0
votes
1answer
114 views

Command does not execute properly on remote server

I've been trying to update my backup script such that it saves data on a remote server instead of on a local disk. I have succeeded in converting the entire script but the last part in which I remove ...
0
votes
1answer
157 views

Using Xargs to write a tar archive in numerical order

I need to write an LTO of single frame files (DPX) in frame number order. When using the standard command below the frames are written out of order. tar -b 1024 -cvf /dev/nst0 <directory> ...
0
votes
1answer
524 views

Order a list of files, by date modified, then unzip them in that order

I have a list of zip files, that must be extracted by date modified, they contain updated images and the strange way the local mls provides them means that newer zip files container newer versions of ...
2
votes
0answers
45 views

How many ways are there to convert and pass stdin as command parameter?

I am new to Linux shell. I know that xargs can be used to accept stdin from a pipe and pass it to another command as parameter. Are there other ways to do so? Is there a list I can refer to? A non-...
2
votes
0answers
132 views

Why does this pipe not end when the las process dies (zombie)?

I have a script run and monitored by svscan/supervise. When the last luces-hf/run: #!/bin/bash set -v export http_proxy=[redacted] curl -N -s https://[redacted] |\ grep --line-buffered "event" | ...
1
vote
0answers
23 views

Use a bash array as a place-in argument list (with Midnight Commander)

I'm having a little bit of trouble figuring out how I can use a bash array for an argument list. so far, the below code does not work. The %s below is Midnight Commander specific. F=(%s); for i in "$...
1
vote
0answers
40 views

What are the major differences between the Darwin/BSD and GNU versions of Findutils?

OS X comes with its own versions of find, locate, and xargs. GNU versions of these utilities are also available as part of GNU Findutils. What are the major differences between the two versions? Is ...
0
votes
0answers
74 views

Difference between two almost same command

Please consider two following command: $ echo ls | xargs -I cmd echo cmd | source /dev/stdin $ echo ls | source /dev/stdin What's the difference between these commands? In my machine the result of ...