Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9260775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:58:47+00:00 2026-06-18T12:58:47+00:00

To be quick, this is my command: echo user1,user2,user3 | xargs -d, -L 1

  • 0

To be quick, this is my command:

echo "user1,user2,user3" | xargs -d, -L 1 usermod -g specialgroup

I want to add multiple existing users to a single group in one single command line. But, the above doesn’t work, however if you put:

echo "user1,user2,user3" | xargs -d, -L 1 echo

It lists you the three users:

user1
user2
user3

Any idea on how I could do it? Even if it’s without the xargs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:58:48+00:00Added an answer on June 18, 2026 at 12:58 pm

    Due to a final newline written by echo, user3 becomes user3\n. I’ve tested your example (removing formatting attempts and extraneous echos from the code), and I’ve found it’s the only problem preventing it from working.

    Use echo -n "user1,user2,user3" to avoid final newline.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I will make this quick and simple I have a query and I want
Quick facts, I got this function from http://lua-users.org/wiki/SplitJoin at the very bottom, and am
I want to execute following command in shell script cp /somedire/*.(txt|xml|xsd) /destination/dir/ But this
When this quick one hour project came up I never thought that 2 days
I have this quick sort implementation to sort the characters. int main(){ char val[]
I have this quick question, i have got the username variable from a form
i have this quick issue please. I have this code here which permits me
I put together this quick carousel that I'm using to cycle through different divs
I will keep this quick. The attached code for the most part works i
I will make this quick. I'm using Ruby/LDAP to search using my base_dn criteria.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.