scripting for classification


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting scripting for classification
# 1  
Old 03-04-2009
scripting for classification

hi i am very new to scripting. i am learning by myself. i found this example. can any one help in writing script for this example, so that i can have an idea how to analyse and script.

example:

overview: The aim of this exercise is to classify books into four seperate files and then print a summary report.

specification:
The books records are stored in one csv file and the layout and the contents are contained in aPPENDIX 1.
There are four categories of books: sports, computing, children's and horror. You will need to determine the category and then write a series of 3 records to the appropiate file. The files need to be created in your program and their names will be: children_books, horror_books, sports_books and computing_books. They will be stored in a directory calles $HOME/tutorial. The format of four files is contained in Appendix 2.
Records which do not belong to any of the above categories should be printed to the screen as an error.

The summary report will be displayed on the screen and will contain the following information:
- Date
- names of files created (including path name)
- total number of bokks processed
- total value of books

******************************
Appendix 1 - CSV File sample
ISBN, Title, Category, cost, NO of copies
978-0340681138, Five Get into TRouble (Famous Five), Enid Blyton, Childrens, 6, 3
978-0142301883, The Little Match Girl, Hans Christian Anderson, Childrens, 3, 2
978-0304921532, cell, Stephen King, Horror, 7, 1
978-0596100292, Unix in a Nutshell Scripting, Arnold Robbins, Computing, 17, 2
****************
Appendix 2 - Format of output files
ISBN: 978-0340681138
Author: Enid Blyton
Title: Five Get into Trouble (Famous Five)


Thanks in advance
# 2  
Old 03-04-2009
Quote:
Originally Posted by yonex
hi i am very new to scripting. i am learning by myself. i found this example. can any one help in writing script for this example, so that i can have an idea how to analyse and script.

example:

overview: The aim of this exercise is to classify books into four seperate files and then print a summary report.

What have you tried so far, and which part of it is giving you problems?
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Reading a file and Classification

Hello Everyone, I am new to UNIX. I have got a requirement. Thought of posting it in this forum so that someone might help me. Please have a look at the scenario. The Objective is to "classify books into four seperate files and then print a summary report". Specifications are as... (3 Replies)
Discussion started by: yarlagadda999
3 Replies

2. UNIX Desktop Questions & Answers

CDE Classification Banner

Hello; I need to place a classification banner at the top of my Solaris 2.6 CDE Desktop. The Banner must be displayed in all CDE desktop sessions available on the CDE dashboard (1,2,3,4). The Banner must remain anchored at the top of the CDE desktop and must not be able to be closed or hidden... (0 Replies)
Discussion started by: rambo15
0 Replies

3. Shell Programming and Scripting

Creating a Classification Banner

Hello; I need to place a classification banner at the top of my Solaris 2.6 CDE Desktop. The Banner must be displayed in all CDE desktop sessions available on the CDE dashboard (1,2,3,4). The Banner must remain anchored at the top of the CDE desktop and must not be able to be closed... (1 Reply)
Discussion started by: rambo15
1 Replies
Login or Register to Ask a Question