Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Using the example.log file in your home directory, write a bash script that will collect the following information:
1. Date range of the log. This would be the first (oldest) and last (newest) date in the file.
2. Total number of hits during the date range. 1 hit = 1 line
3. Total number of unique visitors. A unique visitor = a unique IP address.
4. Top 10 users, and the number of times they visited.
5. Five most popular resource accessed, and the number of times they were accessed.
6. Ten most visited URLs, and the number of time accessed.
7. Number of visitors using Internet Explorer, broken down by version.
8. Number of people using Firefox, broken down by version.
9. Number of people using any other browser.
THE FORMAT OF THE LOG:
Each line in the log file is equal to one visit, or hit. The log is a tab-delimited file with 6 columns of data. It will be necessary to extract data from a specific column and break it down further. The columns in the log file are in the order below, and contain the following data:
1. IP address of the visitor.
2. Username of the visitor
3. Date and time the user visited.
4. The access method, resource, and protocol used.
5. URL accessed by the user.
6. The ‘User Agent’ string containing browser and other system information from the user.
2. Relevant commands, code, scripts, algorithms:
• bash
• head
• tail
• cut
• tr
• sed
• wc
• sort
• uniq
• grep
• printf
cut & sort) multiple times in one command chain
3. The attempts at a solution (include all code and scripts):
(These for the date ranges)
(for the top hits but we believe this isnt completely correct)
also know that the sort and awk commands can be of use but dont know how to put it into a line.
(ip addresses, but not sure if correct either.)
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Pace university, New York, New York. United States. Professor Thomas Murphy, RH134
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
---------- Post updated at 10:54 AM ---------- Previous update was at 10:52 AM ----------
so it wont let me link the course =( and also wont let me link the data for this assignment. Anyone know a work around? says I need at least 5 post first
---------- Post updated at 10:55 AM ---------- Previous update was at 10:54 AM ----------
Here is a little snippet of what the data I'm working with looks like.
Last edited by rbatte1; 10-19-2015 at 02:13 PM..
Reason: Added CODE tags for code & data block
- With the sample given, the assumption for the first question on first and last line is wrong. On top, the delimiter for cut should be reconsidered.
- Your attempt to find the top hits (whatever this means) looks for the string constant "date"; not sure this is what you want.
- Your attempt to answer question 3 can be simplified and doesn't meet the question's kernel.
I have a project tree like that.
after running find command with the -no -empty option, i am able to have a list of non empty directory
DO_MY_SEARCH="find . -type d -not -empty -print0"
MY_EXCLUDE_DIR1=" -e NOT_IN_USE -e RTMAP -e NOT_USEFULL "
echo " " > $MY_TEMP_RESULT_1
while... (2 Replies)
Discussion started by: jcdole
2 Replies
2. Post Here to Contact Site Administrators and Moderators
I previously posted a question in the Shell Scripting forum a few minutes ago. I recieved a message telling me I had breached a rule, apparently because my post was a homework infraction. Well, im currently trying to figure out how to use Raspberry Pi's (as im a starter)
I asked one of my... (1 Reply)
A new project was posted on your project board.
Project title: Bash Shell Tutoring
Estimated Budget:
$50/hr
Start date:
Immediately
Required skills:
Linux, Bash, Shell, UNIX
I work as a datawarehouse designer and developer.
Although I usually stick to the role of an analyst,... (0 Replies)
i have two doubts..
1. what is the use /etc/project file. i renamed this file and when i tried to switch user or login with some user account the login was happening slowly. but when i renamed it to original name it was working fine... why so?
2. unix already has useradd and grouadd for... (4 Replies)
We have a system running ssh. When a user logs in, they do not get the project they are assigned to (they run under "system"). I verify the project using the command "ps -e -o user,pid,ppid,args,project". If you do a "su - username", the user does get the project they are assigned to (and all... (2 Replies)