Log file analyzer, super basic sh file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Log file analyzer, super basic sh file
# 1  
Old 12-17-2017
Log file analyzer, super basic sh file

Hello!
I have a small shell project that is due next week, that I'd appreciate some help with.

task: Write a shell program that can analyze at least 2 types of log files and print them in an easily readable way. Make it so that you can switch between log file types. The two file types should be apache.log and apache.error.log.

So the input should be a log file, and the output should be it's contents printed on the terminal. The only thing this program should do is separate the words with some whitespace charaters.

I'm brand new to writing shell scripts, so I was hoping somebody could help me.
# 2  
Old 12-17-2017
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
This User Gave Thanks to Scott For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Log file analyzer, super basic sh program

Hello! I'd like some help with this assignment. 1. The problem statement, all variables and given/known data: 1)Write a shell script that can uses two types of files as inputs, apache.log and apache.error.log 2)Make it so that you can switch between the two file types 3)Make it so that the... (5 Replies)
Discussion started by: malfiory
5 Replies

2. Windows & DOS: Issues & Discussions

Super Simple Script to remove first characters of any png file

Well I searched the net with varying success, but it seems kinda hard to find a one/max 2 lined command to: strip all *.png files in the folder from their first two characters. Any help is appreciated. In DOS commandline of course... (17 Replies)
Discussion started by: pasc
17 Replies

3. Infrastructure Monitoring

Centralized linux system log analyzer?!

Hello everyone! I`m searching for linux log parser application. I already find some ways, but the best looks logzilla. Requirements: Web interface for viewing Filtering in web Notifications in web or email Open source Support linux system logs, custom logs and apache logs. I will... (5 Replies)
Discussion started by: jabalv
5 Replies

4. IP Networking

Best iptables log analyzer?

Hello all, i want to view my iptables log on web interface, with chart (in option, and this is not my priority). What is the best program for this? I have Ubuntu server. Thanks ! :) (0 Replies)
Discussion started by: Pacifiste95
0 Replies

5. UNIX for Dummies Questions & Answers

Basic Script to check for a file

Hello, Little new to unix scripting. I need to create a script that will do the following. Check in a directory for a file that will be present between 19:00 and 23:00. If the file is present a e-mail then needs to be sent to myself confirming. I did write something basic...as below... ... (3 Replies)
Discussion started by: Thundercat1
3 Replies

6. UNIX for Dummies Questions & Answers

Basic file processing question

I have a csv file with 3 columns. Column 1 is a date "mm/dd/yyyy", column 2 is a dollar amount (e.g. "100.00") & column 3 in a description of where the transaction took place (e.g. "CHECK CRD PURCHASE 10/07 ACME INC USA") so... "10/01/2009","100.00", "CHECK CRD PURCHASE 10/07 ACME INC USA" I... (1 Reply)
Discussion started by: watingo
1 Replies

7. HP-UX

BT-Basic Read File

I'm a real newby to BT-Basic and I have this task at hand. I have to input a user name and password in a BT-Basic program. I would like to compare this input to a name list in root and if found, continue. If not loop back to the input. I have this: Oper_Id_Prompt$ = "Enter ID" print... (1 Reply)
Discussion started by: slapshot
1 Replies

8. UNIX for Dummies Questions & Answers

got a basic doubt on cat-file permissions

Hi all, Today I was just fooling around with directories and faced this. I create a directory 'testdir' and create a file 'myfile' inside it. gandalf@gondor:~$ mkdir testdir gandalf@gondor:~$ cd testdir gandalf@gondor:~/testdir$ touch myfile Then I set the following permissions for the... (7 Replies)
Discussion started by: ranj@chn
7 Replies

9. HP-UX

BAD SUPER BLOCK - Run fsck with alternate super block number

Error received when I tried to restore a blank disk with an 'auto recovery' DDS tape via HP-UX recovery system 2.0 onto a 1Gb SCSI. I assumed it would do the setup, wrong. Could someone tell me the procedure to initial disk for recovering files using cpio. The system is a HP-UX 9.04 version on a... (1 Reply)
Discussion started by: admin wanabee
1 Replies

10. Shell Programming and Scripting

basic unix file command!

Hi there, I am looking to create a single file called outputa.txt, which will show the contents of my directorya and its sub directories, and all file and directory permissions. What command would be used for this? Cheers Kev (2 Replies)
Discussion started by: kev112
2 Replies
Login or Register to Ask a Question