|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Cutting function
I have this example result from the 'last' command
kp04291 pts/6 169.178.137.69 Thu Jun 19 16:25 - 18:40 (02:14) root pts/5 169.178.137.69 Thu Jun 19 15:54 - 18:40 (02:46) How do i cut out the user name and last login only. the thing is that i can use cut with -d as " " as the sapce will vary with the username's length....any suggestions? ....thnx in adv ![]() |
|
#2
|
|||
|
|||
|
pipe in a tr -s " " before the cut to get rid of multiple spaces
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Cutting function |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|