Articles

batch and bash data collection, administrative scripts

November 23, 2012 at 10:12:26
Specs: Windows xp and linux

Hello guys,
I want to collect data on people for my references and info.

What I am looking for to do; is creating a batch and also bash file that will give me a list of queries that I can fill out. it needs to be complicated with loops and redirectories.


When done filling out the queries, it out puts them all correctly formatted in the batch file for me / anyone to review the entries (While its busy saving the info in the back).

Its not to jst output to a text file. I want it more detailed then that.

C:\docs\(Gender)\# (# = first letter of last name)\(LAST NAME, FIRST, MIDDLE)


Example Queries:

NAME:
First:
Middle:
Last:

Date Of Birth
Month:
Date:
Year:

-------

And so on, entries can be added later.

Thanks guys ;)


See More: batch and bash data collection, administrative scripts

Report •


#1
November 23, 2012 at 11:03:41

I would imagine, that it might be difficult to script something like this without an example of an input file. However, why in the description do you ensure that it would be complicated? It seems like the point of a batch script would be to simplify.

Here is what I would recommend, post a sample of at least one full record. In this case it would be more important to be specific in what data is needed, and what all you want in the end format.(and the output in batch/cmd would be to a .txt or a basic format.)

I would think based on your query that you at least have a start of what you need, unless of course its a homework question. If that is the case, post the way you were thinking about writing it, and what data format it is being pulled from.

Also if it is not homework, have you considered instead using a database structure that already is able to do queries?

:: mike


Report •

#2
November 23, 2012 at 11:27:40

Hello Mikelinus,
Thank you for the reply.

Will you are right it is a hom work nd there are requirements.
I have been required to write TWO shell scripts, one which executes in a Unix environment and one which executes in a Windows environment.
The scripts must satisfy the following requirement :
* They must perform some useful system administration function. Some examples of useful system administration functions are given below.
1.Creation of user accounts by reading users’ names from a file
2.Deletion/amendment of users’ accounts
3.Backing up of important system files
3.Archiving of users’ files
4.Deletion of temporary files
5.Easy-to-use menu-driven front end to a number of system commands
6.Displaying of important system information e.g. CPU, memory and disk usage
7,Comparing files and displaying differences
8.Displaying directory information e.g. number of files, subdirectories and total size of a specified directory

I have tried creating user user accounts but it didnt went well.As i have been told it was too simple.
If you can help me with the scripts i'll be greatful.

best regards and thanks


Report •

Related Solutions


Ask Question