{"action":"created","comment":{"url":"https://api.github.com/repos/tldr-pages/tldr/pulls/comments/77598616","id":77598616,"diff_hunk":"@@ -1,19 +1,20 @@\n # xargs\n \n-> Execute a command with piped arguments.\n+> Execute a command with piped arguments coming from another command, a file, etc.\n+> The input is treated as a single block of text and split into separate arguments on spaces, tabs, newlines and end-of-file.\n \n-- Main use:\n+- Main usage pattern:\n \n-`{{arguments}} | xargs {{command}}`\n+`{{arguments_source}} | xargs {{command}}`\n \n-- Specific example: delete all files that start with 'M':\n+- Delete all files with a `.backup` extension:\n \n-`find . -name 'M*' | xargs rm`\n+`{{find . -name '*.backup'}} | xargs {{rm -v}}`\n \n-- Handle whitespace in arguments:\n+- Use the NUL (`\\0`) character as separator (useful to split the input on newlines but not on spaces):","path":"pages/common/xargs.md","position":20,"original_position":20,"commit_id":"83db4498d96ede2e45cff351e696d46a1c95c02e","original_commit_id":"83db4498d96ede2e45cff351e696d46a1c95c02e","user":{"login":"waldyrious","id":478237,"avatar_url":"https://avatars.githubusercontent.com/u/478237?v=3","gravatar_id":"","url":"https://api.github.com/users/waldyrious","html_url":"https://github.com/waldyrious","followers_url":"https://api.github.com/users/waldyrious/followers","following_url":"https://api.github.com/users/waldyrious/following{/other_user}","gists_url":"https://api.github.com/users/waldyrious/gists{/gist_id}","starred_url":"https://api.github.com/users/waldyrious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waldyrious/subscriptions","organizations_url":"https://api.github.com/users/waldyrious/orgs","repos_url":"https://api.github.com/users/waldyrious/repos","events_url":"https://api.github.com/users/waldyrious/events{/privacy}","received_events_url":"https://api.github.com/users/waldyrious/received_events","type":"User","site_admin":false},"body":"I'm inclined to disagree. The \"what\" is important, but if we don't emphasise the \"how\" (indeed, \"why\") it works, we risk defrauding our mission to allow people to *learn* the syntax of commands by example as opposed to memorizing obscure formulas. This was the problem in the previous description which made it hard for me to get a grasp on what was going on until I read the manpage -- which, by the way, describes the -0 option as \"Change xargs to expect NUL (``\\0'') characters as separators, instead of spaces and newlines.\" -- which is literally what it does, and is quite accessible already, IMO.\r\n\r\nThat said, it's not that the description you propose fails to explain the how, but I fear that the two phrases \"split input in newlines\" and \"using the NUL character as separator\" may make the understanding harder, since \\n and \\0 are different characters and xargs is explicitly using the latter -- the conversion is done by the user, but xargs is blind to that.\r\n\r\nI'm not sure I'm being clear. Let me know if I'm rambling or if I need to clarify some of my points.","created_at":"2016-09-06T09:12:24Z","updated_at":"2016-09-06T09:12:24Z","html_url":"https://github.com/tldr-pages/tldr/pull/1039#discussion_r77598616","pull_request_url":"https://api.github.com/repos/tldr-pages/tldr/pulls/1039","_links":{"self":{"href":"https://api.github.com/repos/tldr-pages/tldr/pulls/comments/77598616"},"html":{"href":"https://github.com/tldr-pages/tldr/pull/1039#discussion_r77598616"},"pull_request":{"href":"https://api.github.com/repos/tldr-pages/tldr/pulls/1039"}}},"pull_request":{"url":"https://api.github.com/repos/tldr-pages/tldr/pulls/1039","id":84028087,"html_url":"https://github.com/tldr-pages/tldr/pull/1039","diff_url":"https://github.com/tldr-pages/tldr/pull/1039.diff","patch_url":"https://github.com/tldr-pages/tldr/pull/1039.patch","issue_url":"https://api.github.com/repos/tldr-pages/tldr/issues/1039","number":1039,"state":"open","locked":false,"title":"xargs: rework page to make it more beginner-friendly","user":{"login":"waldyrious","id":478237,"avatar_url":"https://avatars.githubusercontent.com/u/478237?v=3","gravatar_id":"","url":"https://api.github.com/users/waldyrious","html_url":"https://github.com/waldyrious","followers_url":"https://api.github.com/users/waldyrious/followers","following_url":"https://api.github.com/users/waldyrious/following{/other_user}","gists_url":"https://api.github.com/users/waldyrious/gists{/gist_id}","starred_url":"https://api.github.com/users/waldyrious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waldyrious/subscriptions","organizations_url":"https://api.github.com/users/waldyrious/orgs","repos_url":"https://api.github.com/users/waldyrious/repos","events_url":"https://api.github.com/users/waldyrious/events{/privacy}","received_events_url":"https://api.github.com/users/waldyrious/received_events","type":"User","site_admin":false},"body":"This page has been bugging me for a while and I have come across some bumps while using the command. I finally decided to dive in and learn about how it works, and this is the result. Hopefully the page is now more readable, intuitive and useful.","created_at":"2016-09-05T17:29:32Z","updated_at":"2016-09-06T09:12:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed87286af63ee848d4ade911df4d393f1f7ae762","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tldr-pages/tldr/pulls/1039/commits","review_comments_url":"https://api.github.com/repos/tldr-pages/tldr/pulls/1039/comments","review_comment_url":"https://api.github.com/repos/tldr-pages/tldr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tldr-pages/tldr/issues/1039/comments","statuses_url":"https://api.github.com/repos/tldr-pages/tldr/statuses/83db4498d96ede2e45cff351e696d46a1c95c02e","head":{"label":"tldr-pages:xargs-rewrite","ref":"xargs-rewrite","sha":"83db4498d96ede2e45cff351e696d46a1c95c02e","user":{"login":"tldr-pages","id":7366472,"avatar_url":"https://avatars.githubusercontent.com/u/7366472?v=3","gravatar_id":"","url":"https://api.github.com/users/tldr-pages","html_url":"https://github.com/tldr-pages","followers_url":"https://api.github.com/users/tldr-pages/followers","following_url":"https://api.github.com/users/tldr-pages/following{/other_user}","gists_url":"https://api.github.com/users/tldr-pages/gists{/gist_id}","starred_url":"https://api.github.com/users/tldr-pages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tldr-pages/subscriptions","organizations_url":"https://api.github.com/users/tldr-pages/orgs","repos_url":"https://api.github.com/users/tldr-pages/repos","events_url":"https://api.github.com/users/tldr-pages/events{/privacy}","received_events_url":"https://api.github.com/users/tldr-pages/received_events","type":"Organization","site_admin":false},"repo":{"id":15019962,"name":"tldr","full_name":"tldr-pages/tldr","owner":{"login":"tldr-pages","id":7366472,"avatar_url":"https://avatars.githubusercontent.com/u/7366472?v=3","gravatar_id":"","url":"https://api.github.com/users/tldr-pages","html_url":"https://github.com/tldr-pages","followers_url":"https://api.github.com/users/tldr-pages/followers","following_url":"https://api.github.com/users/tldr-pages/following{/other_user}","gists_url":"https://api.github.com/users/tldr-pages/gists{/gist_id}","starred_url":"https://api.github.com/users/tldr-pages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tldr-pages/subscriptions","organizations_url":"https://api.github.com/users/tldr-pages/orgs","repos_url":"https://api.github.com/users/tldr-pages/repos","events_url":"https://api.github.com/users/tldr-pages/events{/privacy}","received_events_url":"https://api.github.com/users/tldr-pages/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tldr-pages/tldr","description":":books: Simplified and community-driven man pages","fork":false,"url":"https://api.github.com/repos/tldr-pages/tldr","forks_url":"https://api.github.com/repos/tldr-pages/tldr/forks","keys_url":"https://api.github.com/repos/tldr-pages/tldr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tldr-pages/tldr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tldr-pages/tldr/teams","hooks_url":"https://api.github.com/repos/tldr-pages/tldr/hooks","issue_events_url":"https://api.github.com/repos/tldr-pages/tldr/issues/events{/number}","events_url":"https://api.github.com/repos/tldr-pages/tldr/events","assignees_url":"https://api.github.com/repos/tldr-pages/tldr/assignees{/user}","branches_url":"https://api.github.com/repos/tldr-pages/tldr/branches{/branch}","tags_url":"https://api.github.com/repos/tldr-pages/tldr/tags","blobs_url":"https://api.github.com/repos/tldr-pages/tldr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tldr-pages/tldr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tldr-pages/tldr/git/refs{/sha}","trees_url":"https://api.github.com/repos/tldr-pages/tldr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tldr-pages/tldr/statuses/{sha}","languages_url":"https://api.github.com/repos/tldr-pages/tldr/languages","stargazers_url":"https://api.github.com/repos/tldr-pages/tldr/stargazers","contributors_url":"https://api.github.com/repos/tldr-pages/tldr/contributors","subscribers_url":"https://api.github.com/repos/tldr-pages/tldr/subscribers","subscription_url":"https://api.github.com/repos/tldr-pages/tldr/subscription","commits_url":"https://api.github.com/repos/tldr-pages/tldr/commits{/sha}","git_commits_url":"https://api.github.com/repos/tldr-pages/tldr/git/commits{/sha}","comments_url":"https://api.github.com/repos/tldr-pages/tldr/comments{/number}","issue_comment_url":"https://api.github.com/repos/tldr-pages/tldr/issues/comments{/number}","contents_url":"https://api.github.com/repos/tldr-pages/tldr/contents/{+path}","compare_url":"https://api.github.com/repos/tldr-pages/tldr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tldr-pages/tldr/merges","archive_url":"https://api.github.com/repos/tldr-pages/tldr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tldr-pages/tldr/downloads","issues_url":"https://api.github.com/repos/tldr-pages/tldr/issues{/number}","pulls_url":"https://api.github.com/repos/tldr-pages/tldr/pulls{/number}","milestones_url":"https://api.github.com/repos/tldr-pages/tldr/milestones{/number}","notifications_url":"https://api.github.com/repos/tldr-pages/tldr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tldr-pages/tldr/labels{/name}","releases_url":"https://api.github.com/repos/tldr-pages/tldr/releases{/id}","deployments_url":"https://api.github.com/repos/tldr-pages/tldr/deployments","created_at":"2013-12-08T07:34:43Z","updated_at":"2016-09-06T08:14:27Z","pushed_at":"2016-09-06T07:37:08Z","git_url":"git://github.com/tldr-pages/tldr.git","ssh_url":"git@github.com:tldr-pages/tldr.git","clone_url":"https://github.com/tldr-pages/tldr.git","svn_url":"https://github.com/tldr-pages/tldr","homepage":"http://tldr-pages.github.io/","size":2440,"stargazers_count":8137,"watchers_count":8137,"language":"TeX","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":585,"mirror_url":null,"open_issues_count":58,"forks":585,"open_issues":58,"watchers":8137,"default_branch":"master"}},"base":{"label":"tldr-pages:master","ref":"master","sha":"13fea84d7e7fcc66149125d9061aa22d28705da5","user":{"login":"tldr-pages","id":7366472,"avatar_url":"https://avatars.githubusercontent.com/u/7366472?v=3","gravatar_id":"","url":"https://api.github.com/users/tldr-pages","html_url":"https://github.com/tldr-pages","followers_url":"https://api.github.com/users/tldr-pages/followers","following_url":"https://api.github.com/users/tldr-pages/following{/other_user}","gists_url":"https://api.github.com/users/tldr-pages/gists{/gist_id}","starred_url":"https://api.github.com/users/tldr-pages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tldr-pages/subscriptions","organizations_url":"https://api.github.com/users/tldr-pages/orgs","repos_url":"https://api.github.com/users/tldr-pages/repos","events_url":"https://api.github.com/users/tldr-pages/events{/privacy}","received_events_url":"https://api.github.com/users/tldr-pages/received_events","type":"Organization","site_admin":false},"repo":{"id":15019962,"name":"tldr","full_name":"tldr-pages/tldr","owner":{"login":"tldr-pages","id":7366472,"avatar_url":"https://avatars.githubusercontent.com/u/7366472?v=3","gravatar_id":"","url":"https://api.github.com/users/tldr-pages","html_url":"https://github.com/tldr-pages","followers_url":"https://api.github.com/users/tldr-pages/followers","following_url":"https://api.github.com/users/tldr-pages/following{/other_user}","gists_url":"https://api.github.com/users/tldr-pages/gists{/gist_id}","starred_url":"https://api.github.com/users/tldr-pages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tldr-pages/subscriptions","organizations_url":"https://api.github.com/users/tldr-pages/orgs","repos_url":"https://api.github.com/users/tldr-pages/repos","events_url":"https://api.github.com/users/tldr-pages/events{/privacy}","received_events_url":"https://api.github.com/users/tldr-pages/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tldr-pages/tldr","description":":books: Simplified and community-driven man pages","fork":false,"url":"https://api.github.com/repos/tldr-pages/tldr","forks_url":"https://api.github.com/repos/tldr-pages/tldr/forks","keys_url":"https://api.github.com/repos/tldr-pages/tldr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tldr-pages/tldr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tldr-pages/tldr/teams","hooks_url":"https://api.github.com/repos/tldr-pages/tldr/hooks","issue_events_url":"https://api.github.com/repos/tldr-pages/tldr/issues/events{/number}","events_url":"https://api.github.com/repos/tldr-pages/tldr/events","assignees_url":"https://api.github.com/repos/tldr-pages/tldr/assignees{/user}","branches_url":"https://api.github.com/repos/tldr-pages/tldr/branches{/branch}","tags_url":"https://api.github.com/repos/tldr-pages/tldr/tags","blobs_url":"https://api.github.com/repos/tldr-pages/tldr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tldr-pages/tldr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tldr-pages/tldr/git/refs{/sha}","trees_url":"https://api.github.com/repos/tldr-pages/tldr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tldr-pages/tldr/statuses/{sha}","languages_url":"https://api.github.com/repos/tldr-pages/tldr/languages","stargazers_url":"https://api.github.com/repos/tldr-pages/tldr/stargazers","contributors_url":"https://api.github.com/repos/tldr-pages/tldr/contributors","subscribers_url":"https://api.github.com/repos/tldr-pages/tldr/subscribers","subscription_url":"https://api.github.com/repos/tldr-pages/tldr/subscription","commits_url":"https://api.github.com/repos/tldr-pages/tldr/commits{/sha}","git_commits_url":"https://api.github.com/repos/tldr-pages/tldr/git/commits{/sha}","comments_url":"https://api.github.com/repos/tldr-pages/tldr/comments{/number}","issue_comment_url":"https://api.github.com/repos/tldr-pages/tldr/issues/comments{/number}","contents_url":"https://api.github.com/repos/tldr-pages/tldr/contents/{+path}","compare_url":"https://api.github.com/repos/tldr-pages/tldr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tldr-pages/tldr/merges","archive_url":"https://api.github.com/repos/tldr-pages/tldr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tldr-pages/tldr/downloads","issues_url":"https://api.github.com/repos/tldr-pages/tldr/issues{/number}","pulls_url":"https://api.github.com/repos/tldr-pages/tldr/pulls{/number}","milestones_url":"https://api.github.com/repos/tldr-pages/tldr/milestones{/number}","notifications_url":"https://api.github.com/repos/tldr-pages/tldr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tldr-pages/tldr/labels{/name}","releases_url":"https://api.github.com/repos/tldr-pages/tldr/releases{/id}","deployments_url":"https://api.github.com/repos/tldr-pages/tldr/deployments","created_at":"2013-12-08T07:34:43Z","updated_at":"2016-09-06T08:14:27Z","pushed_at":"2016-09-06T07:37:08Z","git_url":"git://github.com/tldr-pages/tldr.git","ssh_url":"git@github.com:tldr-pages/tldr.git","clone_url":"https://github.com/tldr-pages/tldr.git","svn_url":"https://github.com/tldr-pages/tldr","homepage":"http://tldr-pages.github.io/","size":2440,"stargazers_count":8137,"watchers_count":8137,"language":"TeX","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":585,"mirror_url":null,"open_issues_count":58,"forks":585,"open_issues":58,"watchers":8137,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tldr-pages/tldr/pulls/1039"},"html":{"href":"https://github.com/tldr-pages/tldr/pull/1039"},"issue":{"href":"https://api.github.com/repos/tldr-pages/tldr/issues/1039"},"comments":{"href":"https://api.github.com/repos/tldr-pages/tldr/issues/1039/comments"},"review_comments":{"href":"https://api.github.com/repos/tldr-pages/tldr/pulls/1039/comments"},"review_comment":{"href":"https://api.github.com/repos/tldr-pages/tldr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tldr-pages/tldr/pulls/1039/commits"},"statuses":{"href":"https://api.github.com/repos/tldr-pages/tldr/statuses/83db4498d96ede2e45cff351e696d46a1c95c02e"}}}}
{"actor":{"display_login":"waldyrious"}}