GIDForums  

Go Back   GIDForums > Computer Forums > Computer Software Forum - Linux
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #61  
Old 10-Dec-2008, 09:36
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,217
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: run script command on ns2.26


Quote:
Originally Posted by Diaz
Code:
/home/diaz/Desktop/ns-allinone-2.32/ns-2.32/./ns % ns simple.tcl

% = is this sign showing that i'm ready to use ns2
No, it shows that you are already running ns. You do not run a tcl script from inside ns. You run it from a command line.

1. Open a new Terminal window. For "standard" Linux installations, you will see a prompt ending with a '$' and the current directory will be in your home directory. Depending on your setup, the prompt may or may not have other stuff, but for normal users (not root), the default prompt will end in a '$'

2. You can cd to wherever you want to be when running ns. You will still see a prompt ending with a '$'

3. From that command prompt, you do not (that's not) enter

Code:
$ ns

4. If you have cd'ed into the directory where simple.tcl resides, you enter
Code:
$ns simple.tcl

5. If your current directory is not the place where simple.tcl resides, you can enter
Code:
ns path_name_to_the_directory_where_the_tcl_script_resides/simple.tcl

Regards,

Dave

Footnote:
Quote:
Originally Posted by Diaz
my questions sound stupid
Well, they don't sound stupid to me. I mean, no one was born knowing this stuff, and no one should be reluctant to ask questions. If I can't answer them, maybe someone else...

"Men are born ignorant, not stupid.
They are made stupid by education."
---Bertrand Russel
  #62  
Old 10-Dec-2008, 22:17
Diaz Diaz is offline
New Member
 
Join Date: Dec 2008
Location: Malaysia
Posts: 3
Diaz is on a distinguished road

Re: run script command on ns2.26


Halo Dave!

hehe.I like your footnote very much..Good reminder for everyone..

bytheway..

1)
Quote:
You can cd to wherever you want to be when running ns. You will still see a prompt ending with a '$'

I learn something here as before this i have been using the "%" sign to start executing the ns2. The "$" sign is always there when i open up a new terminal window.

2)
Quote:
If you have cd'ed into the directory where simple.tcl resides, you enter

For your info., my simple.tcl resides in my Desktop directory. So I opened up a new terminal window and i changed my directory to my Desktop. I run this command :

Quote:
~$ ns simple.tcl

However i got error message saying " simple.tcl doesn't exist, try again "

No changes were made to the tcl script before and i am very sure i downloaded it correctly into my Desktop. I have also tried with other tcl scripts but i still got the same error message..


http://www.youtube.com/watch?v=am1mnMdruqA

This is an example video from youtube and i wish i could get tru only the first 10 seconds like dat..to get to the nam..

REgards,

Diaz
  #63  
Old 11-Dec-2008, 00:52
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,217
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: run script command on ns2.26


Quote:
Originally Posted by Diaz
...

For your info., my simple.tcl resides in my Desktop directory. So I opened up a new terminal window and i changed my directory to my Desktop

You show that the prompt is
Code:
~$

The '~' indicates to me that you may be in your home directory, not your Desktop directory. I could be wrong, since my prompt is not set up as yours apparently is.

Why not move (or copy) the tcl file to your home directory and try again with a new terminal window? Or, you could change to your Desktop directory. Make sure the tcl file is in the directory where you are:

Code:
$ cd ~/Desktop $ ls -l

If it shows simple.tcl is in that directory, then
Code:
$ ns simple.tcl

Or, if the file is in the Desktop directory, then, from anywhere you can do something like
Code:
$ ns ~/Desktop/simple.tcl

But I never operate on stuff in the Desktop directory, since it tends to clutter up the Desktop with extra stuff that I really don't want to see. I'm funny that way.

Regards,

Dave
  #64  
Old 26-Jul-2009, 11:04
mannat mannat is offline
New Member
 
Join Date: Jul 2009
Posts: 1
mannat is on a distinguished road

Re: run script command on ns2.26


hello.....
i hv a problem when i try to execute .ns example.tcl error occurs that .bashrc not found...
m using windows xp nd download cygwin for ns.
ns version is ns2.27
plz tell me solution...
tc
  #65  
Old 19-Aug-2009, 03:48
alimajeed alimajeed is offline
New Member
 
Join Date: Aug 2009
Posts: 6
alimajeed is on a distinguished road

Re: run script command on ns2.26


hi to all
i have problem in NS-2.27 i make modification on pi.cc and pi.h and i make recompile by using the following instructions:

cd ~/ns-allinone-2.27/ns-2.27
./configure --x-libraries=/usr/x11R6/lib/--x-includes=/usr/x11R6/include/
make ;make install


and after finsh the last instruction i needed to run my TCL program when i type:

ns exp.tcl

it appeared the following message:

bash:ns: command not found

can anyone help me to solve this problem pleeeeeeeeeease....
thank u.
  #66  
Old 19-Aug-2009, 08:50
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,217
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: run script command on ns2.26


Quote:
Originally Posted by alimajeed
hi to all
i have problem...

Since you started a new thread with this same question, I responded there: http://www.gidforums.com/t-21745.html

You might ask the administrator to delete your post on this thread (since it does not fit in with the title of the thread) and keep the one that I replied to.


Regards,

Dave
 
 

Recent GIDBlogProgramming ebook direct download available by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Web stats fcolor Web Design Forum 10 12-Jul-2007 09:48
Need Free Website Templates sam_dezine Web Design Forum 8 06-Sep-2006 04:25
Who Is A Web Designer ? alicehopkins Web Design Forum 1 13-Jun-2006 03:56
HTML Code amgujral Web Design Forum 0 07-Apr-2006 10:46
Two virtual hosts, cgi script behaves differently on each blimbo Apache Web Server Forum 0 04-Aug-2004 10:35

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 02:34.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.