BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] GNU xargs trick
- Subject: [Discuss] GNU xargs trick
- From: smallm at sdf.org (Mike Small)
- Date: Wed, 27 Apr 2016 18:26:52 +0000
- In-reply-to: <0ce76547-700d-a9ac-631e-d3d4fe1de1a5@gmail.com> (message from Rich Pieri on Wed, 27 Apr 2016 14:09:11 -0400)
Rich Pieri <richard.pieri at gmail.com> writes: > On 4/27/2016 12:31 PM, Mike Small wrote: >> New line characters in particular. -I changes matters to line at a >> time so other space characters should be okay, right? > > Yes, line at a time, but you may need to quote the substitution string > in the command arguments. I wondered about that but when I tried a little experiment it seemed like it's probably not necessary. When I "cat | xargs -I{} ls {}" and type some two word lines the files ls complains of being missing do seem to be the two word "files" I'm typing. Seems like maybe what xargs gets (i.e. the expansion of {}) goes right to one of the exec library calls without further shell intervention. Let me know if I'm wrong on this. I continue to find the various Unix shell expansions too complicated to keep in my head at once or retain over time. And unfortunately I'm not getting any smarter as I age. On this topic, the debian bug report where GNU Parallels came into being as a debian package has some interesting discussion re. GNU parallel and xargs and another thing called parallel from moreutils. Early in the discussion there's the question of what parallel can do that xargs cannot: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=518696 -- Mike Small smallm at sdf.org
- Follow-Ups:
- [Discuss] GNU xargs trick
- From: richard.pieri at gmail.com (Rich Pieri)
- [Discuss] GNU xargs trick
- References:
- [Discuss] GNU xargs trick
- From: richard.pieri at gmail.com (Rich Pieri)
- [Discuss] GNU xargs trick
- Prev by Date: [Discuss] GNU xargs trick
- Next by Date: [Discuss] GNU xargs trick
- Previous by thread: [Discuss] GNU xargs trick
- Next by thread: [Discuss] GNU xargs trick
- Index(es):