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
Solved

A few questions for a knowledgeable Linux fan.

Posted on 2002-07-23
6
230 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How code a 301 redirect for folder files -> 1 file 2 58
centos commands 6 67
The better OS Architecture 13 62
Check for Linux process in script 7 45
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.

790 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