Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
47 user(s) are online (43 user(s) are browsing Forums)

Members: 0
Guests: 47

more...

Support us!

Headlines

 
  Register To Post  

Nullifying error messages
Quite a regular
Quite a regular


See User information
Hey,

Perhaps some fellow can help me with another shell issue.

Take the following:

Eval 1+2+3 >T:whatever

The output correctly rights to T:whatever.

If I type:

Eval hello >T:whatever

The data doesn't go to T:whatever, which is fine. But is there anyway I can stop the resulting help appearing in the shell window.

I tried:

Eval hello >T:whatever >nil:

Didn't work

I tried:

Run <nil: >nil: eval hello >T:whatever >nil:

Which is overkill... but still didn't work xD

Help!

Go to top
Re: Nullifying error messages
Just can't stay away
Just can't stay away


See User information
@djrikki

Try: Eval hello >T:whatever *>nil:

< is input, > is output and *> is error output

You can also combain them: <>nil:

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top
Re: Nullifying error messages
Just can't stay away
Just can't stay away


See User information
Another way to do it in scripts is:

set whatever `eval 1+2+3` ;notice it uses ` not '

Then the result is stored in ram and not on a filesystem so it's faster. use unset whatever at the end of the script to remove the varible from ram.

you can access the variable in several ways...

Echo $whatever
Echo {whatever}
get whatever


Amiga user since 1985
AOS4, A-EON, IBrowse & Alinea Betatester

Ps. I hate the new amigans website. <shudder>
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project