[SOLVED] Query based Search Engine..Help required.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Its very urgent and I have no idea how to even get started with it. If anyone can only explain it to me how to start and explain what am I supposed to do in this question.
Design a Query based Search Engine which can categorize email addresses
on basis of Domain name. Make a supposition that recognized domains
are (@gmail.com, @hotmail.com, @yahoo.com, @nu.edu.pk). Text files based report must
be generated reflecting:
You must use Functions for each requirement mentioned below. In total there should be atleast 4 functions.
Percentage of Email Occurrences of unique domain. ( A duplicate email entry must be
counted once)
Create a filter to remove duplicate entries from data set and store the result in a file
named filtered_data.txt.
Separate files for each unique domain name consisting of emails belong to it.
Set the permissions of files that only owner can read and write, also make these files hidden through script.
Why not ask your tutor for clarification on the requirements?
Other than that, yes, it all looks like it can be done, however as you don't tell us what you can / can't use, what platform it is, whether you have access to a database or are having to do this all with "flat" files and BASH shell scripts we can't really help.
As with your other thread, post what you've done and we might be able to point you in the right direction.
Oh, and "It's very urgent", it may be for you, but as we all offer our time and experience for free it's not particularly urgent for us.
Thing - Command
Searching - grep
Sorting - sort
Counting - wc -l
Splitting line into fields - awk or cut if they are fixed width
Filtering - uniq
Piping output through different commands - |
A lot depends on the source data file format, the above commands should give you a start.
Thing - Command
Searching - grep
Sorting - sort
Counting - wc -l
Splitting line into fields - awk or cut if they are fixed width
Filtering - uniq
Piping output through different commands - |
A lot depends on the source data file format, the above commands should give you a start.
Looks to me like they are looking for a pure bash script that does this via functions.
if I have a file which is full of email id's of various domains and I want to use that file to calculate the percentage of Email Occurrences then how am I supposed to link that file to the function where I actually calculate the percentage of unique occurrence? how can I make checks on the data in that .txt file?
Have you been paying attention in class? Doing the labs and such?
Have you even tried googling for this information?
We are not here to do your homework step by step for you. If you have a problem, either research it yourself, or post the code you have tried writing that is giving you the problem.
I have never been using any such forums before and doing all my work by myself. I never asked for the solution to my question, only asked for a little guidance. We were not taught such things, thats y I had to ask and learn myself.
Anyways thankyou for all the help.
Thats righteous that you are doing the work by yourself to learn something. Everyone will agree.
But, you aren't trying the researching bit very hard, evidenced by this: I went to google and typed in part of your question, and the second result is an entire conversation about this exact thing. It took me less than 3 seconds.
Again, if you need help with part of your code, post it and ask a question. Because it's easier to understand your question when you post the code related to the question.
If this is part of a class (which it sounds like), then your class notes/book should give you all the pieces you need. If they are not clear ask your instructor.
As above, show us your code; we are here to help, but not to give the soln.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.