Log file for using Ocean scripting

M

madhero

Guest
Hi Members,

I have a question about saving log files for "ocean" command.
If I use the command like this:

ocean <oceanscript.ocn>script.log

If there is already a script.log exists, ocean will say "File exists"
and quit. How can I simply replace the previous log file? Thank you!
 
madhero wrote:
Hi Members,

I have a question about saving log files for "ocean" command.
If I use the command like this:

ocean <oceanscript.ocn>script.log

If there is already a script.log exists, ocean will say "File exists"
and quit. How can I simply replace the previous log file? Thank you!
$ man your_favotite_shell # ... and hopefully not 'csh'
/noclobber
 
On May 15, 11:23 am, madhero <uest...@gmail.com> wrote:
Hi Members,

I have a question about saving log files for "ocean" command.
If I use the command like this:

ocean <oceanscript.ocn>script.log

If there is already a script.log exists, ocean will say "File exists"
and quit. How can I simply replace the previous log file? Thank you!

I think the command that you are using by default overwrites the
existing file. Could you confirm this once again.

If its not overwriting then you could add a line in the ocean script
itself to delete that particular file in the begining of the
simulation. Consult OCEAN documentation in this regard.

Cheers,
Naveen.
 
PM wrote, on 05/15/08 13:08:
madhero wrote:
Hi Members,

I have a question about saving log files for "ocean" command.
If I use the command like this:

ocean <oceanscript.ocn>script.log

If there is already a script.log exists, ocean will say "File exists"
and quit. How can I simply replace the previous log file? Thank you!

$ man your_favotite_shell # ... and hopefully not 'csh'
/noclobber
In other words, this is a UNIX thing, and is nothing whatsoever to do with
ocean...

I did try also doing:

ocean -restore oceanscript.ocn -log script.log

but ocean does some messing around with the port variables to create this pseudo
text terminal - and so any printed output doesn't end up in the log file.

Instead I can do:

icms -restore oceanscript.ocn -log script.log -nographE

and that does it. -nographE is similar to -nograph, except that graphical
windows can still be opened (as with "ocean").

Regards,

Andrew.
 
1. What about the solution Given by Andrew in a previous post ?
http://groups.google.com/group/comp.cad.cadence/browse_thread/thread/606f0396e56c6e06/3af511a9fdce6822?lnk=gst&q=ocean+log+file#3af511a9fdce6822

Well it's slightly different since the ocean script is loaded into the
CIW rather than running from a UNIX shell but It does not really
matter to you ? doesn't it ?

2. From Unix, did you try :
cat yourOcean.ocn | ocean >! ocean.log ?
This is an idea that springs to my mind but I didn't try myself since
I'm off-Line.

==> PM: What's the matter with csh ? Have you got real issues with it
or just a fun of "Csh Programming Considered Harmful" ?
http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/

Emmmm, I'm nosy ...

Riad.
 
On May 15, 4:37 pm, Andrew Beckett <andr...@DcEaLdEeTnEcTe.HcIoSm>
wrote:
PM wrote, on 05/15/08 13:08:

madhero wrote:
Hi Members,

I have a question about saving log files for "ocean" command.
If I use the command like this:

ocean <oceanscript.ocn>script.log

If there is already a script.log exists, ocean will say "File exists"
and quit. How can I simply replace the previous log file? Thank you!

$ man your_favotite_shell # ... and hopefully not 'csh'
/noclobber

In other words, this is a UNIX thing, and is nothing whatsoever to do with
ocean...

I did try also doing:

ocean -restore oceanscript.ocn -log script.log

but ocean does some messing around with the port variables to create this pseudo
text terminal - and so any printed output doesn't end up in the log file.

Instead I can do:

icms -restore oceanscript.ocn -log script.log -nographE

and that does it. -nographE is similar to -nograph, except that graphical
windows can still be opened (as with "ocean").

Regards,

Andrew.
Errr, If I use ocean -restore oceanscript.ocn > script.log, it quits
if there's already a file, but works properly if not. But if I use
ocean -restore oceanscript.ocn -log script.log, it overwrites the
file, but did not actually save the right log file.
 
On May 15, 11:34 pm, madhero <uest...@gmail.com> wrote:
On May 15, 4:37 pm, Andrew Beckett <andr...@DcEaLdEeTnEcTe.HcIoSm
wrote:



PM wrote, on 05/15/08 13:08:

madhero wrote:
Hi Members,

I have a question about saving log files for "ocean" command.
If I use the command like this:

ocean <oceanscript.ocn>script.log

If there is already a script.log exists, ocean will say "File exists"
and quit. How can I simply replace the previous log file? Thank you!

$ man your_favotite_shell # ... and hopefully not 'csh'
/noclobber

In other words, this is a UNIX thing, and is nothing whatsoever to do with
ocean...

I did try also doing:

ocean -restore oceanscript.ocn -log script.log

but ocean does some messing around with the port variables to create this pseudo
text terminal - and so any printed output doesn't end up in the log file.

Instead I can do:

icms -restore oceanscript.ocn -log script.log -nographE

and that does it. -nographE is similar to -nograph, except that graphical
windows can still be opened (as with "ocean").

Regards,

Andrew.

Errr, If I use ocean -restore oceanscript.ocn > script.log, it quits
if there's already a file, but works properly if not. But if I use
ocean -restore oceanscript.ocn -log script.log, it overwrites the
file, but did not actually save the right log file.
Deleting the specific file in the ocean file is not the solution,
because the ocean file won't be loaded if the file exists...
And yes, I am using csh.
 
On May 15, 7:28 am, solidrepell...@gmail.com wrote:
On May 15, 11:23 am, madhero <uest...@gmail.com> wrote:

Hi Members,

I have a question about saving log files for "ocean" command.
If I use the command like this:

ocean <oceanscript.ocn>script.log

If there is already a script.log exists, ocean will say "File exists"
and quit. How can I simply replace the previous log file? Thank you!

I think the command that you are using by default overwrites the
existing file. Could you confirm this once again.

If its not overwriting then you could add a line in the ocean script
itself to delete that particular file in the begining of the
simulation. Consult OCEAN documentation in this regard.

Cheers,
Naveen.
Yes, I am using csh... And I tried, if I use bash, it will overwrite
the existing file...
It's a good idea to try to delete the particular file if it exists
before using this command, but not in the ocean file, because it won't
be loaded if the log file exists. I will use the unix command to
delete it. Thank you
 
madhero wrote:

I have a question about saving log files for "ocean" command.
If I use the command like this:
ocean <oceanscript.ocn>script.log
If there is already a script.log exists, ocean will say "File exists"
and quit. How can I simply replace the previous log file? Thank you!
$ man your_favotite_shell # ... and hopefully not 'csh'
/noclobber
In other words, this is a UNIX thing, and is nothing whatsoever to do with
ocean...
....
Errr, If I use ocean -restore oceanscript.ocn > script.log, it quits
if there's already a file, but works properly if not. But if I use
ocean -restore oceanscript.ocn -log script.log, it overwrites the
file, but did not actually save the right log file.

Deleting the specific file in the ocean file is not the solution,
because the ocean file won't be loaded if the file exists...
And yes, I am using csh.
Once more again:
Redirecting (>) is done bye the shell (in your case 'csh')
and has nothing to do with ocean ...

With your favourite shell you have 2 choices:

1) general (in your shell)

$ unset noclobber

2) particular (for the command issued):

$ ocean < oceanscript.ocn >! script.log
 
On May 16, 3:41 am, PM <p...@gmx.de> wrote:
madhero wrote:
I have a question about saving log files for "ocean" command.
If I use the command like this:
ocean <oceanscript.ocn>script.log
If there is already a script.log exists, ocean will say "File exists"
and quit. How can I simply replace the previous log file? Thank you!
$ man your_favotite_shell # ... and hopefully not 'csh'
/noclobber
In other words, this is a UNIX thing, and is nothing whatsoever to do with
ocean...
...
Errr, If I use ocean -restore oceanscript.ocn > script.log, it quits
if there's already a file, but works properly if not. But if I use
ocean -restore oceanscript.ocn -log script.log, it overwrites the
file, but did not actually save the right log file.

Deleting the specific file in the ocean file is not the solution,
because the ocean file won't be loaded if the file exists...
And yes, I am using csh.

Once more again:
Redirecting (>) is done bye the shell (in your case 'csh')
and has nothing to do with ocean ...

With your favourite shell you have 2 choices:

1) general (in your shell)

$ unset noclobber

2) particular (for the command issued):

$ ocean < oceanscript.ocn >! script.log
Thank you! I understand now...

name
! name
& name
&! name
The file name is used as standard output. If the file
does not
exist then it is created; if the file exists, it is
truncated,
its previous contents being lost.

If the shell variable noclobber is set, then the file
must not
exist or be a character special file (e.g., a
terminal or
$B!F(B/dev/null') or an error results. This helps prevent
acciden$B!>(B
tal destruction of files. In this case the $B!F(B!'
forms can be
used to suppress this check.
 
madhero wrote, on 05/16/08 04:34:
On May 15, 4:37 pm, Andrew Beckett <andr...@DcEaLdEeTnEcTe.HcIoSm
wrote:
In other words, this is a UNIX thing, and is nothing whatsoever to do with
ocean...

I did try also doing:

ocean -restore oceanscript.ocn -log script.log

but ocean does some messing around with the port variables to create this pseudo
text terminal - and so any printed output doesn't end up in the log file.

Instead I can do:

icms -restore oceanscript.ocn -log script.log -nographE

and that does it. -nographE is similar to -nograph, except that graphical
windows can still be opened (as with "ocean").

Regards,

Andrew.

Errr, If I use ocean -restore oceanscript.ocn > script.log, it quits
if there's already a file, but works properly if not. But if I use
ocean -restore oceanscript.ocn -log script.log, it overwrites the
file, but did not actually save the right log file.
Errr, isn't that what I said?

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top