There is no 'CAT' command.  There is a 'cat' command.  ;-)

Unix is case sensitive.

To execute a command just type it in.  The shell will use the PATH
environment variable to find the program you just typed in.  (PATH is an
environment variable containing a colon separated list of directories).  If
the program you typed in is not in one of the directories in your PATH, it
will not be executed and you will get an error something like this:

bash: foo: command not found

Several details and common errors.

- To see what is in your path type 'set | grep PATH'
- The current directory is probably not (and should not be) in your path.
To run a program in the current directory type ./foo
- There is a shell builtin named 'test'.  Many new unix users create a test
program (perhaps hello world) and name it test and wonder why typing 'test'
doesn't do anything.  Type ./test or better yet, don't name any programs
'test'.
- To add directories to the PATH for everyone in the system, either edit
/etc/profile, or create a script in /etc/profile.d.  To add directories to
the PATH for just one user, edit that users ~/.bash_login file.
- To figure out what is being executed when you type in a command use 'type
<command>'.  That will tell you the path of the program that is being
executed, or if the command is an alias or a shell builtin.

HTH,

-K

> -----Original Message-----
> From: Juan Carlos [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 27, 1999 12:29 AM
> To: [EMAIL PROTECTED]
> Subject: ¿How do it?
> 
> 
> Hi friends, 
> 
> ¿How to execute an linux command, to obtain any
> information, using Java?  (ex:  the CAT command).  
> I have Red Hat version 5.3, and jdk1.1.5. 
> 
> Thanks
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Bid and sell for free at http://auctions.yahoo.com
> 
> 
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact 
> [EMAIL PROTECTED]
> 


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to