INTELLIGENT WORK FORUMS FOR COMPUTER PROFESSIONALS
Come Join Us!
- Talk With Other Members
- Be Notified Of Responses
To Your Posts
- Keyword Search
- One-Click Access To Your
Favorite Forums
- Automated Signatures
On Your Posts
- Best Of All, It's Free!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.
Partner With Us!
"Best Of Breed" Forums Add Stickiness To Your Site

(Download This Button Today!)
Member Feedback
"...I wish I knew about this site years ago. It would have saved me a lot of heartaches..."
Geography
Where in the world do Tek-Tips members come from?
|
No experience with Unix scripting.
|
|
|
sunshine96 (Visitor) |
16 Sep 02 13:21 |
Hello,
I have no experience with Unix scripting or any others. I have just recently taking a Shell programming for Admins. class and I still do not have a clue. I do not have much exposure to using unix like I should. Would you all be able to tell me what would be a good college class to take at a slower paste and or any books to read or reference to. I would really like to give this shell script a good effort.
Reg, Sunshine96 |
|
d3vNull (TechnicalUser) |
16 Sep 02 13:46 |
|
|
Ladd (Visitor) |
16 Sep 02 16:38 |
First, realize what UNIX shell scripting is: shell commands. Learn the UNIX command line and you'll be fine. It is really something you just need to practice. A fine way to learn is to use UNIX (or a variant) exclusively. Don't have a UNIX workstation? Need to run windows? Then go have a look at cygwin. http://www.redhat.com/software/cygwin/ . Using this, you can at lease play around with a bash shell or something. |
|
|
LiveFire Labs (Visitor) |
21 Sep 02 15:45 |
|
|
olded (Programmer) |
21 Sep 02 22:40 |
Live Fire:
I must respectfully disagree with you recommending the New Korn Shell to a beginner. I very much like Bolsky's book, but as a reference - not as a beginner.
Learning the Korn Shell by Bill Rosenblatt (another O'Reilly book) is a much more gentle introduction.
IMO, the very best introduction for learning basic Shell Programming (Hayden Books) by Stephen Kochan and Patrick Wood. (It's an old book, but still viable. You can read 23 sample pages at Amazon.com)
I do like your links - especially the one on Advanced Bash programming. I'm familiar with the author - Mendel Cooper. He definitely knows his stuff.
Regards,
Ed
|
|
Thank you all for responding. You have given me some great information.
I am currently working on a project with a co-worker and acourse me being new to the unix scripting world. Would someone be able to advise on the following.
1. List1: Extract the legal name of each emplyee from the HR list using these guidlines:
a. Skip middle initials, and titles such as Jr. or III, etc. b. Convert 'firstname lastname' to lowercase only. c. Sort the list d. Check for duplicate name (may be different employees with same first & last names).
2. List2: Extract the user names of every mailbox on usx011:
a. Modify scripts in /root/scripts/sunshine96 (fb2sys and mb2name) to extract a listing of every 'firstname lastname' of the mailboxes on usx011. b. Convert to 'firstname lastname in lowercase only. c. Sort the list
3. Use a looping to compare these two lists. a. Loop1 with a read command to save the first employee name in List1 to Variable1. b. While still in Loop1, start loop2 to read in the EACH employee name in List2 to Variable2, until a match is found. c. Compare Variable1 to Variable2. 1. If same, put in Report1 --> The employee's legal name is the same as the mailbox name. 2. If different, put in Report2 --> The employee name spelling is in the HR dtabase, but may be spelled fifferently in OpenMail. d. Once the first name has been compared and put in either Report1 or Report2, the Loop1 should read the next name record (Step 3.a) and compare it to EACH record in List2 (Step 3.b), continuing until every name is List1 has been compared to every name in List2.
4. After completing and falling out of the loops above, create a loop that compares one name at a time from List2 to EACH name in List1, using similar steps as for above. a. Only when a name exists in List2, but NOT in List1, put it in Report3 --> These are mailbox names that do not match a legal name of any employee. b. Determine which names from Report3 are generic accounts. c. Determine which names from Report3 are contractor accounts. d. Determine which names from Report3 are active employees who use a different mailbox name thatn the legal name provided by the HR database.
5. Extract, in similar fashion as step 1, the names of employees by Site by Site to be migrated off of USX011. Your help would be greatly appreciated.
Reg, Sunshine96 |
|
|
 |
|
Join Tek-Tips® Today!
Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.
Here's Why Members Love Tek-Tips Forums:
Talk To Other Members
- Notification Of Responses To Questions
- Favorite Forums One Click Access
- Keyword Search Of All Posts, And More...
Register now while it's still free!
Already a member? Close this window and log in.
Join Us Close