# Ambiguous output redirect error

**URL:** https://community.unix.com/t/ambiguous-output-redirect-error/226857
**Category:** Shell Programming and Scripting
**Created:** [January 7, 2009, 2:48pm UTC](https://community.unix.com/t/ambiguous-output-redirect-error/226857 "2009-01-07T14:48:05Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![pareshan](https://community.unix.com/letter_avatar/pareshan/32/5_5575768a8748004e209b776fc1b2916d.png) [@pareshan](https://community.unix.com/u/pareshan)
#### Post date: [January 7, 2009, 2:48pm UTC](https://community.unix.com/t/ambiguous-output-redirect-error/226857/1 "2009-01-07T14:48:05Z")

</div>

Hi everyone, While I was trying to do

DATE=`date +"%Y%m%d_%H%M%S"`  
STARTLOG=$TUXSTDDIR/start\_$DATE.log  
tmboot -y \> $STARTLOG 2\>&1

I got an error i.e. Ambiguous output redirect error. Here the first part is to boot the account so there is nothing wrong with that. I have defined the startlog also but I dint understand why I am having problem here.

I dint get what that error means. I will appreciate any help to make this right.

thanks alot

---

<div class="post-metadata">

### Author: ![cfajohnson](https://community.unix.com/user_avatar/community.unix.com/cfajohnson/32/16669_2.png) [@cfajohnson](https://community.unix.com/u/cfajohnson)
#### Post date: [January 7, 2009, 5:41pm UTC](https://community.unix.com/t/ambiguous-output-redirect-error/226857/2 "2009-01-07T17:41:21Z")

</div>

```nohighlight
tmboot -y > "$STARTLOG" 2>&1 

```

---

<div class="post-metadata">

### Author: ![pareshan](https://community.unix.com/letter_avatar/pareshan/32/5_5575768a8748004e209b776fc1b2916d.png) [@pareshan](https://community.unix.com/u/pareshan)
#### Post date: [January 7, 2009, 5:52pm UTC](https://community.unix.com/t/ambiguous-output-redirect-error/226857/3 "2009-01-07T17:52:27Z")

</div>

That really dint change anything. Its the same error message again

---

<div class="post-metadata">

### Author: ![reborg](https://community.unix.com/user_avatar/community.unix.com/reborg/32/167_2.png) [@reborg](https://community.unix.com/u/reborg)
#### Post date: [January 7, 2009, 5:52pm UTC](https://community.unix.com/t/ambiguous-output-redirect-error/226857/4 "2009-01-07T17:52:57Z")

</div>

That is a csh/tcsh error but you have used bourne redirect syntax.

The csh/tcsh syntax would be:

```nohighlight
command >& logfile

```

---

<div class="post-metadata">

### Author: ![cfajohnson](https://community.unix.com/user_avatar/community.unix.com/cfajohnson/32/16669_2.png) [@cfajohnson](https://community.unix.com/u/cfajohnson)
#### Post date: [January 7, 2009, 7:18pm UTC](https://community.unix.com/t/ambiguous-output-redirect-error/226857/5 "2009-01-07T19:18:42Z")

</div>

> [@reborg](#):
>
> That is a csh/tcsh error

That's not only [t]csh:

```plaintext
$ q="we rt"
$ echo x > $q
bash: $q: ambiguous redirect

```

---

<div class="post-metadata">

### Author: ![reborg](https://community.unix.com/user_avatar/community.unix.com/reborg/32/167_2.png) [@reborg](https://community.unix.com/u/reborg)
#### Post date: [January 7, 2009, 7:31pm UTC](https://community.unix.com/t/ambiguous-output-redirect-error/226857/6 "2009-01-07T19:31:33Z")

</div>

> [@cfajohnson](#):
>
> [indent]  
> That's not only [t]csh:

Actually it is when written as posted by the OP. The uppercase 'A' is the indicator for this hence I took this to be a copy+paste.

---

<div class="post-metadata">

### Author: ![pareshan](https://community.unix.com/letter_avatar/pareshan/32/5_5575768a8748004e209b776fc1b2916d.png) [@pareshan](https://community.unix.com/u/pareshan)
#### Post date: [January 8, 2009, 10:56am UTC](https://community.unix.com/t/ambiguous-output-redirect-error/226857/7 "2009-01-08T10:56:42Z")

</div>

yeah you are right its c shell error. i thought im in ksh but actually im in c shell so when i used

cmd \> & file its working.

thanks alot
