From 85da9a1c03551b9a7f97ee1ef67f8630ee37688b Mon Sep 17 00:00:00 2001 From: Alex Flores Date: Tue, 29 Dec 2015 10:58:16 -0500 Subject: [PATCH] replace example with an OS agnostic example --- pages/common/xargs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/common/xargs.md b/pages/common/xargs.md index 40aa47262..8d30bd739 100644 --- a/pages/common/xargs.md +++ b/pages/common/xargs.md @@ -10,10 +10,10 @@ `{{arguments_null_terminated}} | xargs -0 {{command}}` -- Example: list unneeded packages with deborphan and remove them with apt-get: +- delete all files that start with 'M' -`sudo deborphan | xargs sudo apt-get remove` +`ls M* | xargs rm` -- creating variables: copy all files that start with 'M' to the Desktop +- assign incoming arguments to a variable so that they may be used in the middle of a command `ls M* | xargs -J % cp % ~/Desktop`