help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: cd problems


From: Luke Scharf
Subject: RE: cd problems
Date: 02 Apr 2003 12:55:38 -0500

On Wed, 2003-04-02 at 12:25, Julian DeMarchi wrote:
> Unfortunately, you need to type (assuming you are running Octave under
> CygWin)
> 
>       cd /cygdrive/c/emme2
> 
> Indeed this is contrary to Windows OS convention, but remember Cygwin
> is a Linux emulator running under Windows, so the file system
> conventions in Octave follow Linux and Unix conventions, not Windows.

Technically, it's not an emulator but a set of libraries that allow Unix
programs to be recompiled under Windows with few or no changed.  AFAIK,
you can't take Linux binaries and run them under Cygwin.  Perhaps a
better description would be  "A Unix compatibility layer that draws
heavily on the GNU code made popular by Linux"

> On the topic you raise, though, watch out for backslashes native to
> Windows.  For example (for reasons I do not know), if you were to type
> 
>       cd \
> 
> you could end up having a hard time breaking out.. I would hazard a
> guess that the "\" is interpreted as a line continuation of sorts, but
> the only way I could figure out to break out was to close the Octave
> session.

In Unix shells and in many programming languages, the '\' character is
the escape character.  It means "do not interpret the following
character in the normal way, for I wish for you to pass it on to the
next level".

This means that in the shell, you can escape a newline character and
have the shell treat it like it's a space or a tab or something
similar.  If you type "cd \" and press enter twice, you will execute the
command "cd" with no arguments and return to a normal prompt.

Another thing that you should know is that entering the command "cd"
without any arguments will take you back to your $HOME directory.

Despite my limited explanation, this stuff does make sense.  Once you
figure out what the folks who designed it were thinking, it's a very
elegant system.

-Luke



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]