Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleCmd_Environ (0.21 sec)

  1. src/os/exec/example_test.go

    	cmd := exec.Command("sh", "-c", "echo stdout; echo 1>&2 stderr")
    	stdoutStderr, err := cmd.CombinedOutput()
    	if err != nil {
    		log.Fatal(err)
    	}
    	fmt.Printf("%s\n", stdoutStderr)
    }
    
    func ExampleCmd_Environ() {
    	cmd := exec.Command("pwd")
    
    	// Set Dir before calling cmd.Environ so that it will include an
    	// updated PWD variable (on platforms where that is used).
    	cmd.Dir = ".."
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 06:18:48 UTC 2022
    - 3.5K bytes
    - Viewed (0)
Back to top