Re: how to suppres warning [message #62972] |
Wed, 22 October 2008 08:51  |
pgrigis
Messages: 436 Registered: September 2007
|
Senior Member |
|
|
edward.s.meinel@aero.org wrote:
> On Oct 22, 10:18�am, David Fanning <n...@dfanning.com> wrote:
>> Ingo von Borstel writes:
>>> Actually I hoped
>>> to get a useful hint, especially as I knew you �as a usually very
>>> helpful person... :S
>>
>> If I knew a useful hint, I'd probably offer it. But all
>> that comes to mind is "fix the code". :-)
>>
>> Cheers,
>>
>> David
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming:http://www.dfanning.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
> If only control-o still worked...
What did it do?
Ciao,
Paolo
>
> Ed "I've been doing this too long" Meinel
|
|
|
|
|
|
Re: how to suppres warning [message #62976 is a reply to message #62975] |
Wed, 22 October 2008 07:53   |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Mark wrote:
> Well, as long as this topic has come up....
>
> In alot of my code (running bash on unix) I get this warning printed
> to the screen:
>
> bash: defaults: command not found
>
> along with other occasional warnings that bash isn't happy for some
> reason I can't comprehend.
>
>
> I really have no idea at what point in the code(s) that this warning
> originates from, but since everything works fine I'd just as soon
> suppress it. Does anyone know how this might be done easily, either in
> IDL or unix?
Err...this is also off-topic, but don't you have any curiosity to find out what is causing
the problem? With google at your fingertips it's easy to get at least an idea if not the
outright answer. E.g. Have you checked your .profile, .login, .bashrc, .bash_profile, or
the various /etc forms of those files to see where the "defaults" command is being called,
why is it being called, and why it isn't in your path?
You know, this topic reminds me of callers to the NPR show "Car Talk". People describe
these sometimes bizarre things that are happening (noises, shaking, other weird stuff) as
they drive their cars. The inevitable question "How long has this been going on?" comes up
and the answers typically range from several weeks to months in some cases. It never
ceases to amaze me what people will put up with. :o)
cheers,
paulv
|
|
|
|
|
|
|
|
|
Re: how to suppres warning [message #63059 is a reply to message #62972] |
Thu, 23 October 2008 04:20  |
edward.s.meinel@aero.
Messages: 52 Registered: February 2005
|
Member |
|
|
On Oct 22, 11:51 am, pgri...@gmail.com wrote:
> edward.s.mei...@aero.org wrote:
>> On Oct 22, 10:18 am, David Fanning <n...@dfanning.com> wrote:
>>> Ingo von Borstel writes:
>>>> Actually I hoped
>>>> to get a useful hint, especially as I knew you as a usually very
>>>> helpful person... :S
>
>>> If I knew a useful hint, I'd probably offer it. But all
>>> that comes to mind is "fix the code". :-)
>
>>> Cheers,
>
>>> David
>>> --
>>> David Fanning, Ph.D.
>>> Fanning Software Consulting, Inc.
>>> Coyote's Guide to IDL Programming:http://www.dfanning.com/
>>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
>> If only control-o still worked...
>
> What did it do?
>
> Ciao,
> Paolo
>
>
>
>> Ed "I've been doing this too long" Meinel
>
>
Control-o would suppress output to the screen.
Ed
|
|
|
Re: how to suppres warning [message #63060 is a reply to message #62975] |
Thu, 23 October 2008 01:36  |
Ingo von Borstel
Messages: 54 Registered: September 2006
|
Member |
|
|
Hi,
> is your problem that you get megabytes of warning texts, but execution
> continues?
The only error which I get is a type conversion error - which has no
influence whatsoever and the programme happily continues to run.
> you do not care that some part of your data was not read correctly?
Exactly. I'm reading a data files with different number of columns which
as the first and last part of each line contains a textual comment -
which of course fails to convert to a numerical value.
> If it is the former, maybe it is better to suffer the warnings than to
> waste effort in suppressing them.
Well, yes, I _can_ live with them. As it seems that it's not as easy
(just changing a switch or compile option yet unknown to me), that's
what it will be. I know it's not overtly complicated to get rid of them,
but I would need to customize the read-in procedure (it can deal with
leading, but not trailing text) which I wanted to avoid in order to
avoid code duplication.
Thanks for your advice :)
Ingo
--
Ingo von Borstel <newsgroups@planetmaker.de>
Public Key: http://www.planetmaker.de/ingo.asc
If you need an urgent reply, replace newsgroups by vgap.
|
|
|
Re: how to suppres warning [message #63069 is a reply to message #62976] |
Wed, 22 October 2008 09:59  |
astroboy2k
Messages: 34 Registered: July 2007
|
Member |
|
|
On Oct 22, 10:53 am, Paul van Delst <Paul.vanDe...@noaa.gov> wrote:
> Mark wrote:
>> Well, as long as this topic has come up....
>
>> In alot of my code (running bash on unix) I get this warning printed
>> to the screen:
>
>> bash: defaults: command not found
>
>> along with other occasional warnings that bash isn't happy for some
>> reason I can't comprehend.
>
>> I really have no idea at what point in the code(s) that this warning
>> originates from, but since everything works fine I'd just as soon
>> suppress it. Does anyone know how this might be done easily, either in
>> IDL or unix?
>
> Err...this is also off-topic, but don't you have any curiosity to find out what is causing
> the problem? With google at your fingertips it's easy to get at least an idea if not the
> outright answer. E.g. Have you checked your .profile, .login, .bashrc, .bash_profile, or
> the various /etc forms of those files to see where the "defaults" command is being called,
> why is it being called, and why it isn't in your path?
>
> You know, this topic reminds me of callers to the NPR show "Car Talk". People describe
> these sometimes bizarre things that are happening (noises, shaking, other weird stuff) as
> they drive their cars. The inevitable question "How long has this been going on?" comes up
> and the answers typically range from several weeks to months in some cases. It never
> ceases to amaze me what people will put up with. :o)
>
> cheers,
>
> paulv
Well yes, I am curious, and yes, I have looked into it, and no, I
can't figure out what the problem is for the life of me.
Unfortunately, my employers don't pay me to program in IDL just for
the sake of writing elegant IDL programs; they want answers. If I want
to keep my job an occasional warning which does nothing but clutter my
screen is something I have to write off after having given it the old
college try to fix it.
As long as this topic had come up I thought I might mention it; I
wouldn't have wasted the bandwidth or the time of the people who
kindly have helped me out so many times otherwise. I thought possibly
there was some IDL or unix fix that would suppress this sort of
message that was likely common knowledge.
Having said that, I'm afraid my message did come across like I was
asking someone else to do my thinking for me out of laziness. Sorry
'bout that.
Mark
|
|
|