• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

A few questions for a knowledgeable Linux fan.

1- Why and when is it sometimes necessary to precede a bash execute script with a period?

2- Up to how many decimal places is Bash calculation accurate?

3- How do you change the Linux propmt to LINUX spoken>?

4- How do you write an expression that evaluates if 6 is more than or equal to yyyy?

5- What is the name of the disk image source file used to install Linux. That was copied from the Linux CD to a floppy using rawrite in DOS?

Thank you for your help everyone.

LuisP
0
LuisP
Asked:
LuisP
1 Solution
 
TheophilusCommented:
1. If the command you want to execute is in the current directory and that directory is not in your path you need to precede the command with "./". Usualy, "normal" users will have the current directory in their path. It is however considered a security risk for root to have the current directory in his path. If you want to know whether the current directory is in your path or not give the command

export | grep path

and look for "." or "./"

2. I don't do a lot of bash scripting so I may be wrong here but if I understand correctly, bash only works with integers. If you need more precision you will need to use some external program.

3. To change the appearence of the prompt you need to change the environment variable PS1. There are so many possibilities that they can not all be covered here. There is  good article about this at http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/index.html that explains everything.

4. To use bash to evaluate whether one variable is greater than another use

if ["$a" -gt "$b" ]

where $a and $b are the variable to be compared. (More on comparison operators in bash can be found at http://www.tldp.org/LDP/abs/html/comparison-ops.html)

5. That will probably vary depending on what distribution you have but it is probably called "bootdisk" or something similar. The documentation that came with your distribution should tell you.
0
 
joolsCommented:
LuisP,

It is also a good idea to ask the question in just one EE area, not duplicate it in two.

Now that you have been TOLD the answers to your course work, have you learned anything?


J
0
 
LuisPAuthor Commented:
Yes I learned a lot, thanks to you and Theophilus.

jools, if you would like to answer the questions that would be fine, the lectures I think should be left aside, or to my parents, don't you think?. Ultimately if there is harm done to the learning experience it would not be your fault.
Thank you.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LuisPAuthor Commented:
Thank you Theophilus. I learned a great deal from your answer.
LuisP
0
 
LuisPAuthor Commented:
jools, If I want to ask a questions in more than one area of EE, I think taht I can do it. I do not think that there is any harm done to anyone. Again If you want to answer it, It is up to you. I think that that is a right that anyone can have.

And If you want to tell me where to look for the rules and regulations of EE, please do so, so that I am not ignorant of what I can, and can not do.
Thank you again for your input.
LuisP
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now