MandrivaThis Forum is for the discussion of Mandriva (Mandrake) Linux.

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.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

I wanted to type: g++ , but i forgot to press shift key while typing ++ so, == was typed instead,then i pressed enter without knowing about my mistake.Then i saw g== entered, but i do not know what it is ,or what it does.
I do not know also how to undo commands (if possible),i just read somewhere that pressing arrow up acts as history of commands,and commands could be edited this way,so i did that,but still g== was on history.

Your intentions seem honourable, but it doesn't really make sense in this context, so don't worry about it, you're in no danger of damaging anything.

Hi

I do not know about shell variables and what they can do,but my supposition is that whenever i press and enter = on terminal,then probably it will act ,since i do not know what would be the action,i am concerned about that. Of course i am going to learn about shell variables by studying ....
Thank you.

Every time you enter something at the command line of a shell, it will assume that the first thing on the command line is a command. It begins by parsing the command using characters defined in an environment variable called $IFS (internal field separator). But you can safely assume that means "white space" (See http://www.livefirelabs.com/unix_tip...3/10132003.htm). So the shell splits up the command into "words" which are collections of characters it has parsed out using white space for the delimiter. It then assumes that the first word is a command and checks to see if it is a command build into the shell itself. If not, it attempts to find the command (looking in paths defined in the $PATH environment variable), and if found it runs the command, handing the command all remaining words that were on your command line.

If you want, try typing "=" and hitting enter. See what happens. It should tell you that the "=" command was not found. If you don't get some message like that, then the shell did find some command to run or it handled the command itself. So, when you typed "g==" and hit enter, it did not look for a command to run, because from its perspective, this was a valid shell command, setting a variable to the value =.

Understanding this much should get you a bit farther along and should dispel some of your concerns.

ALSO: you can use the "which" and "whereis" commands to find out where the shell is finding a command or if it will find it at all:

whereis <some command>: tells you all the different places it could look (defined in $PATH) to find a command.
which <some command>: tells you exactly which of the possibilities it is really going to run for you

Every time you enter something at the command line of a shell, it will assume that the first thing on the command line is a command. It begins by parsing the command using characters defined in an environment variable called $IFS (internal field separator). But you can safely assume that means "white space" (See http://www.livefirelabs.com/unix_tip...3/10132003.htm). So the shell splits up the command into "words" which are collections of characters it has parsed out using white space for the delimiter. It then assumes that the first word is a command and checks to see if it is a command build into the shell itself. If not, it attempts to find the command (looking in paths defined in the $PATH environment variable), and if found it runs the command, handing the command all remaining words that were on your command line.

If you want, try typing "=" and hitting enter. See what happens. It should tell you that the "=" command was not found. If you don't get some message like that, then the shell did find some command to run or it handled the command itself. So, when you typed "g==" and hit enter, it did not look for a command to run, because from its perspective, this was a valid shell command, setting a variable to the value =.

Understanding this much should get you a bit farther along and should dispel some of your concerns.

ALSO: you can use the "which" and "whereis" commands to find out where the shell is finding a command or if it will find it at all:

whereis <some command>: tells you all the different places it could look (defined in $PATH) to find a command.
which <some command>: tells you exactly which of the possibilities it is really going to run for you

I am studying about shell commands...etc,but it seems still a long way to understand and learn enough.
Yesterday i tried to undo or reverse the command g== by typing
unset g== but, output showed no success.(probably it was : no such file or...),so if i have set shell variable to = (as friend katkin said before),then why wasn,t that unset later?

My understanding which caused posting LQ ,is that some times a small change can cause a great deviation in the long run,so one should know what he/she is doing,specially in cases which are valued more,and to me g++, c++ are more important because of their capabilities.