The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
To call/execute a shell script from a shell script konark UNIX for Dummies Questions & Answers 1 10-26-2007 02:16 PM
How to pass a parameter from one Shell-script to another Shell-script subodhbansal Shell Programming and Scripting 2 09-22-2007 02:19 AM
How to Run a shell script from Perl script in Parent shell? hifake Shell Programming and Scripting 16 08-28-2007 05:42 PM
Have a shell script call another shell script and exit heprox Shell Programming and Scripting 2 11-20-2006 04:17 AM
division operation in shell script ragha81 Shell Programming and Scripting 31 10-23-2006 02:43 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-17-2008
Registered User
 

Join Date: Apr 2007
Posts: 27
Stumble this Post!
what does the operation '>&' mean in a shell script

hi, all,

i saw a syntax like this

usr/local/mpiexec -np 8 /home/XXXX/program_exe >& ./temp/out

the output will be put into ./temp/out.

I want to know the meaning of the operation symbol '>&'.


Thanks
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-17-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
Stumble this Post!
It redirects standard error as well as standard output to the file in question.

See the manual page of your shell for detailed information about redirection operators.
Reply With Quote
  #3 (permalink)  
Old 05-17-2008
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,572
Stumble this Post!
Quote:
Originally Posted by era View Post
It redirects standard error as well as standard output to the file in question.

See the manual page of your shell for detailed information about redirection operators.
in that case,
shouldn't that be as
>1 2>&1
Reply With Quote
  #4 (permalink)  
Old 05-17-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
Stumble this Post!
It should, but it's available as a shorthand at least in bash. The manual discourages this use. I imagine it's offered for compatibility with older shells.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:29 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0