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.
hi everyone!
I came across to this question and excuse my ignorance but, I do not understand the question at all. Would someone please give me some guidance? thank you!
If the command line to run your script looks like this:
hi everyone!
I came across to this question and excuse my ignorance but, I do not understand the question at all. Would someone please give me some guidance? thank you!
If the command line to run your script looks like this:
./scriptname file1 file2
What would $2 refer to in the script?
This looks very much like homework. Believe it or not, despite the rule against homework:
Quote:
Originally Posted by LQ rules
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 searches) and we'll do our best to help. Keep in mind that your instructor might also be an LQ member.
hi everyone!
I came across to this question and excuse my ignorance but, I do not understand the question at all. Would someone please give me some guidance? thank you!
If the command line to run your script looks like this:
./scriptname file1 file2
What would $2 refer to in the script?
Seems like it's another homework question....have you checked your textbooks and/or asked your instructor??
Think about what you're doing here...you're typing in a script name, and two command line arguments to that script. The first argument would be, $1....so......
I agree with HMW...we don't mind helping out with homework, but you need to be upfront about it, and you do need to show some effort of your own. These questions are to help YOU learn, so you have to start thinking about them, and trying to figure them out.
I am very confuse about the rules about this forum... I am an old dude trying to learn Linux for the class I am taking. If you see my post history, at the begging I used the word "Homework" and I was told not to use that word anymore. So I am not using it.
With my post, I am not looking for people to just give me the answer and move on! I am 41 years old and because I did not do what I was suppose to do when I was a young man, I am back in school dealing with three kiddos at home at the same time trying to get a degree. I am here to LEARN, not to pass a course. So, I do not understand what they are saying about $2 in the script.
Thank you for your understanding and help. Would you please give me some guidance?
You have been given the tools to LEARN this already.
Quote:
Originally Posted by HMW
Homework or not; I suggest you use DuckDuckGo, you will find the answer in a minute. https://is.gd/ez6qCb
Quote:
Originally Posted by TB0ne
Think about what you're doing here...you're typing in a script name, and two command line arguments to that script. The first argument would be, $1....so......
I am very confuse about the rules about this forum... I am an old dude trying to learn Linux for the class I am taking. If you see my post history, at the begging I used the word "Homework" and I was told not to use that word anymore. So I am not using it.
With my post, I am not looking for people to just give me the answer and move on! I am 41 years old and because I did not do what I was suppose to do when I was a young man, I am back in school dealing with three kiddos at home at the same time trying to get a degree. I am here to LEARN, not to pass a course. So, I do not understand what they are saying about $2 in the script.
Thank you for your understanding and help. Would you please give me some guidance?
But... this course you are taking must surely have textbooks of some kind, or provide some sort of online help?
Regardless, if you clicked the link(s) I provided from DuckDuckGo, you will find all the necessary information about $2. Also, TB0ne provided you with more than just a small hint in his post.
I too have taken classes with small kids at home. I know that it is not easy.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.