![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sort / cut question | BearCheese | Shell Programming and Scripting | 5 | 07-13-2007 03:40 PM |
| SORT question | ssgatbliss | UNIX for Dummies Questions & Answers | 2 | 03-22-2007 10:15 AM |
| Sort/Grep Question | aarondesk | UNIX for Dummies Questions & Answers | 5 | 03-06-2006 02:57 PM |
| Sort Question | bobo | UNIX for Dummies Questions & Answers | 7 | 02-24-2006 09:04 AM |
| Using Sort | kemobyte | Shell Programming and Scripting | 1 | 11-30-2005 05:25 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
how to use sed to sort out this question
root:x:0:0:0000-Admin(0000):/:/sbin/sh
rootcsh:x:0:1:0000-Admin(0000):/:/bin/csh nocol:x:6312:630:NOCOL Monitor,,,:/usr/local/lib/nocol-client:/usr/local/bin/bash nobody:x:60001:60001:uid no body:/:/usr/local/bin/bash noaccess:x:60002:60002:uid no access:/:/usr/local/bin/bash nobody4:x:65534:65534:SunOS 4.x NFS Anonymous Access User:/:/usr/local/bin/bash +@c_staff:::::: +::::::/usr/local/sbin/nologin all above content are in a file called passwd.txt username:password:uid:gid:gcos-field:home-dir:login-shell (i)write a shell script and make above output the fields:username,shell,home directory (ii)and also removes all the lines which start with a '+' Last edited by sonicstage; 04-07-2008 at 12:43 AM. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
is this homework?
what have you done so far? |
|
#3
|
|||
|
|||
|
i only did very little
sed -e '/^+/d' passwd.txt
|
|||
| Google The UNIX and Linux Forums |