The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
read a variable character by character, substitute characters with something else vipervenom25 UNIX for Dummies Questions & Answers 2 06-06-2008 12:18 PM
Separate special character fields baanprog UNIX for Dummies Questions & Answers 1 05-25-2008 06:15 PM
How can i replace a character with blank space? rollthecoin AIX 8 04-22-2008 05:55 AM
how to separate every 10 characters then space then another 10 charactes cdfd123 Shell Programming and Scripting 2 10-22-2007 03:20 AM
rsync problem - space character in filename chief2 UNIX for Dummies Questions & Answers 3 09-24-2004 08:06 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 10-31-2006
Registered User
 

Join Date: Sep 2006
Posts: 9
separate information with a space character

Hi,

I would like to display a sorted list (based on the login name) of the login name, the home directory and the default shell of each user defined on the system ;

I just do
cut -d: -f1,6,7 /etc/passwd | sort


And then I would like to separate each information with a space character.
I had the idea to use the Outpud Field Separator as I use with awk but no way .
How could I like this space with this command ?

thanks .
Reply With Quote
Forum Sponsor
  #2  
Old 10-31-2006
pressy's Avatar
solaris cultist
 

Join Date: Aug 2003
Location: Vienna / Austria (Europe) [EARTH]
Posts: 718
perhabs:

# cut -d":" -f 1,6,7 < /etc/passwd | tr ':' ' '

or the awk way:

# awk -F\: '{printf "%s %s %s\n",$1,$6,$7}' /etc/passwd

regards pressy
Reply With Quote
  #3  
Old 10-31-2006
Registered User
 

Join Date: Sep 2006
Posts: 9
thanks so much
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 04:32 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0