Solved

A few questions for a knowledgeable Linux fan.

Posted on 2002-07-23
6
229 Views
Last Modified: 2010-04-20
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
Comment
Question by:LuisP
6 Comments
 
LVL 1

Accepted Solution

by:
Theophilus earned 150 total points
ID: 7172891
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
 
LVL 19

Expert Comment

by:jools
ID: 7173050
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
 
LVL 1

Author Comment

by:LuisP
ID: 7174890
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 1

Author Comment

by:LuisP
ID: 7174893
Thank you Theophilus. I learned a great deal from your answer.
LuisP
0
 
LVL 1

Author Comment

by:LuisP
ID: 7174920
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7175793
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question