![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 . |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
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
|
|||
|
|||
|
thanks so much
|
|||
| Google The UNIX and Linux Forums |