oh forgot to mention, this is using unix with the korn shell.
okay what i have done is created a total of three files from the etc/passwd file
File one named: names (This file a got all the users names from the /etc/passwd file and put them in this file.
File two named: userid (This file I got all userid's from the /etc/passwd file and put them in this file.
File three: users.ref (This file I pasted with a space as delimiator of the names and userid files together)
Had use the command paste -d" " userid names > users.ref
now that the contents of the file users.ref is clear my object is to eventurally write a script using this one of display the entire contents of the users.ref file in aphalbetical order by last name .
Right now Im just working on the sorting of this so i can figure out how to write the script.
For exampe the file looks like this.im making up userid and such cuz i can't post it here.
So basically im struggling how to sort this file by last name altho the first and last name are considered as one field. I can sort by fields no problem but not part of a field.Code:sn12345 Karin Neostar
Any ideas?
TIA
oh forgot to mention, this is using unix with the korn shell.
Bookmarks