ksh equivalent to >& in csh


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ksh equivalent to >& in csh
# 1  
Old 11-04-2010
ksh equivalent to >& in csh

In csh I am using >&. What is the equivalent in ksh??

Code:
>&      - redirect stdout and stderr (csh,tcsh) 

# 2  
Old 11-04-2010
Code:
2>&1 > ...

# 3  
Old 11-04-2010
Thank you.

One last thing. I am running a program called tdarwin and outputting a log file using |& tee in csh as

Code:
tdarwin |& tee $fdrwlog

What would be the equivalent in ksh in this case?
# 4  
Old 11-04-2010
Code:
tdarwin 2>&1 | tee $fdrwlog

# 5  
Old 11-04-2010
What what be the difference between the two statements below

Code:
tdarwin 2>&1 > $fdrwlog

tdarwin 2>&1 | tee $fdrwlog

The statement below is still outputting the stuff to the terminal

Code:
tdarwin 2>&1 > $fdrwlog

tdarwin 2>&1 | tee $fdrwlog is working great, however no log file is created using tdarwin 2>&1 > $fdrwlog
# 6  
Old 11-04-2010
Quote:
Originally Posted by scottn
Code:
2>&1 > ...

Depending on the OS it may be reversed
> ... 2>&1 (SunOS for example)
2>&1 > ... (HP-UX for example)
# 7  
Old 11-04-2010
I'm using Fedora 8
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

>& >&! in /bin/csh

i am new player in linux what does mean ">& and >&!" in script or command line? thanks (4 Replies)
Discussion started by: abdossamad2003
4 Replies

2. Shell Programming and Scripting

Expect : what is the equivalent to ksh if -s

In Ksh to check if file exists and is non zero .. if ; then echo "Error $FILE does not exists!" else echo "$FILE found!" fi Cant seem to find the Expect equivalent .... Any help is greatly appreciated. (2 Replies)
Discussion started by: popeye
2 Replies

3. Shell Programming and Scripting

Equivalent of set -o vi in csh

Hi, I am working with two shells on two different users. one is on ksh and one is on csh. In ksh I use set -o vi and I am able to see my history commands by typing esc,- keys. I want the same feature in csh as well how can I do that. Regards, Venkat (3 Replies)
Discussion started by: svenkatareddy
3 Replies

4. Shell Programming and Scripting

equivalent of backspace in ksh

Hello All, What would be the equivalent of backspace key in the korn shell. My scenario is: I am trying to install a product..and it comes out with a Licence Agreement screen, When I manually enter backspace key..I am able to get out of the whole agreement message to a point to type Agree A) or... (2 Replies)
Discussion started by: solaix14
2 Replies

5. Shell Programming and Scripting

How to define array in Bourne shell , csh & ksh

Dear friends... Kindly if any one can help me to know the differences in definning & retreiving data from arrays in the sh,csh & ksh. I always facing problems in this issue. thanks...:) BR (3 Replies)
Discussion started by: ahmad.diab
3 Replies

6. Shell Programming and Scripting

what is ksh equivalent of bash echo -n ?

Hi folks, I need to stop printing a new line after echoing a string in KSH. i know bash provides echo -n "string" what is the ksh equivalent for this ? (3 Replies)
Discussion started by: mudhireddy
3 Replies

7. UNIX for Dummies Questions & Answers

Csh Vs Ksh

I created a simple script and attempted to run it. All that the scrip contained was "ls -l". At first I received the message "ksh: run_dir: not found" I then tried typing "csh run_dir" This time the script worked. typing echo $SHELL produced /bin/ksh I would like to understand why this... (4 Replies)
Discussion started by: SUSANR9999
4 Replies

8. Shell Programming and Scripting

Exactly How can we define "sh ksh csh &bash"

Hi - I m prashant. I m new in UNIX&LINUX world. I want to ask that how can we define the shell in Linux like bash,ksh,csh in Linux. What is the use of these shells. I know there are mny experts on net if you can tell me then please do me this favour and tell me about this topic. ... (1 Reply)
Discussion started by: prashantsingh
1 Replies

9. Shell Programming and Scripting

\!* in csh what is it for ksh

Hey guys, Hopefully a simple question for you. In csh I have an alias that looks like: alias ff 'find . -name \!* -print' and can therefore perform a search for a file by typing: ff filename The same comand does not work in ksh alias ff="find . -name \!* -print" I get: find:... (3 Replies)
Discussion started by: timsk
3 Replies

10. Shell Programming and Scripting

Perl equivalent of ksh if / echo statement

Is there an equivalent perl statement for the following ksh statement ? example if then ... else ... fi (2 Replies)
Discussion started by: gefa
2 Replies
Login or Register to Ask a Question