Solved

A few questions for a knowledgeable Linux fan.

Posted on 2002-07-23
6
231 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
centos linux 65 192
bash file 10 67
SMB share across internet 15 83
expand ext4 on centos 6 5 54
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 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