Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8409239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:51:07+00:00 2026-06-09T23:51:07+00:00

I am probe in Unix. I want to know what does this mean? type

  • 0

I am probe in Unix.

I want to know what does this mean?

type ant 1>/dev/null
moduledir=`dirname $0`

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:51:09+00:00Added an answer on June 9, 2026 at 11:51 pm

    The type command (under UNIX, don’t confuse this with MS-DOS/Windows’ CMD.EXE) will show you how a command would be interpreted if executed.

    Using type that way, would print an error message (e.g. ant not found) should the ant command not be found/executable. As others have said, the 1>/dev/null (or simply >/dev/null) redirects messages written to the standard output by that command to “nowhere”, i.e. they will not be printed on the terminal / console. Messages written to the standard error stream would/will still occur. It looks like, that line was meant to check for whether ant could be executed/found, however a respective check to (say) abort the script was not provided, it could like this (depending on your shell, but it looks like a bourne shell flavor anyway):

     type ant > /dev/null
     [ $? -ne 0 ] && exit 1
    

    Another note: with bash the type command never writes any output to the standard error stream, i.e. even the message ... not found gets written to standard output. So the command, as it stands, does never output anything, even in the case of an error (in which the message seems sensible to display, given that this fragment is used as a check anyway).

    Finally, the

     moduledir=`dirname $0`
    

    line stores the directory name of the currently executing script in the variable moduledir. You could later reference it like $moduledir, for example: echo "The directory is: $moduledir.

    Frankly, the two statements, isolated as they are in your question make little sense. While syntax-wise correct, they bear no deeper meaning so one can only speculate what they were ment for. You might want to consider asking another question about what you are actually trying to achieve, rather than just posting (arbitrary) syntax.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does someone know of an Intermapper probe to test if a SQL database is
I would like to probe a tristate signal using chipscope. According to this answer
this is just a quick probe to see if this is technically possible. I'm
I realize this might be a long shot, but does anyone have an example
I want to find a way to do a debug probe in Java. I'm
We're using NewRelic to monitor a Sinatra app. We don't want the probe URL
I want to know what the output e is 65537 (0x10001) means. It happens
How does probe() call gets called? Who calls it? As per my understanding, __init()
Something I was curious about from my lecture: Suppose we want to probe every
Let's say I have these lines: Registry registry = LocateRegistry.getRegistry(2121); RemoteObject probe = (RemoteObject)registry.lookup(REMOTE_OBJ_NAME);//this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.