This looks to me like an ideal opportunity to employ you some xargs (or GNU Parallel):
getent passwd \ | awk -F: '$3>=1000 && $1!="nfsnobody" {print $1}' \ | xargs -I{} \ echo xfs_quota -x -c \"limit bsoft=5g bhard=6g {}\" /home # output: # xfs_quota -x -c "limit bsoft=5g bhard=6g userone" /home # xfs_quota -x -c "limit bsoft=5g bhard=6g usertwo" /home ThisThe advantage to using xargs or parallel is that you can simply remove the echo when you're ready to run the command for real (possibly replacing it with sudo, if necessary).
You can also use these utilities' -p / --interactive (the latter is GNU-only) or --dry-run (parallel only) options, to get confirmation before running each one, or just to see what would run, before you run it.
The general patternmethod used above should work on most Unixes, and usesrequires no GNU-specific xargs options. The double quotes dodo need to be "escaped" so that they appear literally in the output. Note that the "replacement string," {}, in xargs -I{} can be anything you prefer, and -I implies -L1 (run one command per input line rather than batching them up).
GNU Parallel does not require the -I option ({} is the default replacement string), and gives you the instant bonus of running many jobs in parallel, even if you don't want to bother learning about any of its other features.
The advantage to using xargs (or parallel) is that you can simply remove the echo—possibly replacing it with sudo, if necessary—when you're ready to run the command for real.
You can also use these utilities' -p / --interactive or --dry-run options (parallel only), to get confirmation before running each one, or just to see what would run, before you run it.
As a side note, I'm not even sure if xfs_quota's -c option is supposed to be used like this, though I have no XFS filesystems handy to test. You may not have even have needed to deal with a quoted string in the first place (unless you expect usernames with whitespace in them, which I guess is possible), since it looks like you can give multiple -c options on the same command line, according to the man page included with xfsprogs 4.5.something.