title: Echo command in Golang
body: <p>I'm currently trying to execute a simple echo command in Golang on Linux. My code is the following:</p>
  
  <pre><code>cmd = exec.Command("echo", "\"foo 0x50\"", "&gt;", "test.txt")
  
  _, err = cmd.Output()
  
  if err != nil {
      fmt.Println(err)
  }
  </code></pre>
  
  <p>But  test.txt doesn't appear in my folder (even after compile and run the code). That not the first that that I use this method to execute commands and I never thought that I will be block on an echo command.</p>
  
  <p>So how can I fix this code in order to have "foo 0x50" (with the quotes) in the test.txt?</p>