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 04:18 PM
Separate special character fields baanprog UNIX for Dummies Questions & Answers 1 05-25-2008 10:15 PM
How can i replace a character with blank space? rollthecoin AIX 8 04-22-2008 09:55 AM
how to separate every 10 characters then space then another 10 charactes cdfd123 Shell Programming and Scripting 2 10-22-2007 07:20 AM
rsync problem - space character in filename chief2 UNIX for Dummies Questions & Answers 3 09-24-2004 12:06 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-31-2006
remid1985 remid1985 is offline
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 .
  #2 (permalink)  
Old 10-31-2006
pressy's Avatar
pressy pressy is offline Forum Staff  
solaris cultist
  
 

Join Date: Aug 2003
Location: Vienna / Austria (Europe) [EARTH]
Posts: 726
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
  #3 (permalink)  
Old 10-31-2006
remid1985 remid1985 is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 9
thanks so much
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:12 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0