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.
I am not familiar with writing scripts for Linux and would appreciate some assitance in doing so.
I am attemping to write a script that identifies the information in my current system directory.
I read some of this information but I am not able to grasp as quickly. here is what I know so far I know the command for Listing the directory but what else would I need to know?
Last edited by FirstTimer; 08-10-2009 at 02:56 PM.
Well I was not asking you to do my Homework for me, I know nothing about Linux.. I am asking for a sample of both I have started it but I am not sure of how this thing is suppose to look.
###############################################
#Author: John Doe
#Created: 08/10/09
#Purpose: To list of the files in the present working directory
###############################################
Per the LQ Rules, please do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and Google searches) and we'll do our best to help. Also, keep in mind that your instructor might also be an LQ member.
The above is our standard response to homework questions. Please know that we ARE ready and willing to help. One thing we need is to understand what the starting point is. In this case, what exactly have you studied in class, and what reference books are you using? Are you familiar with (e.g.):
basic commands to create directories and switch between them?
basic commands to create files and write data to them?
wildcards (AKA shell expansion)?
Thanks for the information/instructions mentioned above. I am certainly willing to learn. I dont think that I have enough information to make this happen.
Thanks for the information/instructions mentioned above. I am certainly willing to learn. I dont think that I have enough information to make this happen.
If you Google for "bash scripting tutorial", you'll find lots of samples. Also, read the man pages for different commands, as they'll give you ideas on what they can do. You don't say how you want to "identify" the information, but if I was you, I'd read the man pages on "ls", "grep" and "sed" (although sed can get complex...).
Also, when you post, please notice the sticky posts and info on the screens, giving some good advice on how to ask questions. URGENT is more likely to get folks to tell you off, since we volunteer our time to answer questions, than it is to get you a quick answer. Also, if you need script help, you'll get a hand UP, but you won't get a hand OUT...post what you write, and say where you're having problems....
Thanks for the information/instructions mentioned above. I am certainly willing to learn. I dont think that I have enough information to make this happen.
I don't know how to interpret this---do you mean you are going to drop the class? Even with all the people here offering you help?
I think you misunderstood my comment I didnt say I was dropping the class i am willing to see it through and try, however to my almost absent to limited knowledge of this particular OS... I am really struggling but like I said I will have to take my time and see what happens. Even though I only have 2 more weeks till the class ends and I fail.
Thanks for the feedback and "go to" place to address this problem.... And being that I am learning I dont feel so bad at all so you know about ppl bashing me. Its all good now I know I wont ask a stupid question in the midst of smart men. LOL...
Hi FirstTimer,
One of the first things you need to learn of linux in general is that information is not that difficult to understand or implement. The challenge is finding the information. Any general problem you have such a writing a script is a very common problem and so there is loads of information about these things. Just follow these steps:
1. Do a search on this site (LQ) for similar threads that may contain the information you need.
2. Do a google search for the same.
3. If there are things in the information you obtain that you don't understand, post your questions here.
4. Above all, have fun and learn. Knowledge is power (in the good sense).
cheers,
jdk
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.