Results 1 to 5 of 5

Thread: Hey Guys little help

  1. #1
    Join Date
    Sep 2012
    Location
    Guntur
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Hey Guys little help

    Hi guys in the screen shot that guy used a command

    Code:
              ./test.shh 2>&1 |tee test.log
    what's the use of 2>&1 and why he has to use that ??
    Attached Images Attached Images

  2. #2
    Join Date
    Apr 2012
    Beans
    5,606

    Re: Hey Guys little help

    Code:
    2>&1
    redirects the standard error stream (stream 2) into the standard output stream (stream 1) - so error messages get combined with any other output from the command

  3. #3
    Join Date
    Feb 2011
    Location
    Somewhere...
    Beans
    1,543
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Hey Guys little help

    A little Googling gave me this:
    http://stackoverflow.com/questions/8...ell-what-is-21
    Basically, 2>&1 means "redirect all output from stderr to stdout".
    EDIT: Ninja'd!

  4. #4
    Join Date
    Sep 2012
    Location
    Guntur
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Hey Guys little help

    Quote Originally Posted by zombifier25 View Post
    A little Googling gave me this:
    http://stackoverflow.com/questions/8...ell-what-is-21
    Basically, 2>&1 means "redirect all output from stderr to stdout".
    EDIT: Ninja'd!
    Thanks

  5. #5
    Join Date
    Sep 2012
    Location
    Guntur
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Hey Guys little help

    Quote Originally Posted by zombifier25 View Post
    A little Googling gave me this:
    http://stackoverflow.com/questions/8...ell-what-is-21
    Basically, 2>&1 means "redirect all output from stderr to stdout".
    EDIT: Ninja'd!
    Thanks Guys

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •