# Redirection and shell commands

**URL:** <https://discourse.julialang.org/t/redirection-and-shell-commands/34651>\
**Category:** General Usage\
**Created:** [February 14, 2020, 9:27pm UTC](https://discourse.julialang.org/t/redirection-and-shell-commands/34651 "2020-02-14T21:27:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GlenHenshaw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/glenhenshaw/32/5269_2.png) [@GlenHenshaw](https://discourse.julialang.org/u/GlenHenshaw)\
**Post date:** [February 14, 2020, 9:27pm UTC](https://discourse.julialang.org/t/redirection-and-shell-commands/34651/1 "2020-02-14T21:27:00Z")

</div>

From the zsh command line, the following works:

```
> sed 's/BEGIN.*END,//' file.csv > file.csv

```

from the Julia shell environment, it doesn’t:

```
;sed 's/BEGIN.*END,//' file.csv > file.csv
sed: >: No such file or directory

```

The manual indicates that, at least when executing shell commands programmatically, the ‘\>’ character needs to be escaped. But this seems to make no difference:

```
;sed 's/BEGIN.*END,//' file.csv \> file.csv
sed: >: No such file or directory

```

and running it programmatically results in the same behavior:

```
julia> mycmd = `sed 's/BEGIN.*END,//' file.csv \> file.csv`
julia> run(mycmd)
sed: >: No such file or directory

```

Clearly I don’t understand something.
