Skip to content

Instantly share code, notes, and snippets.

@lmas
Created March 5, 2016 22:42
Show Gist options
  • Save lmas/086be86b3b08eaf48578 to your computer and use it in GitHub Desktop.
Save lmas/086be86b3b08eaf48578 to your computer and use it in GitHub Desktop.
Start multiple terminal/bash session in the same path.
package main
import (
"os"
"os/exec"
)
// Start a new terminal/bash session in specified path.
func session(path string) {
os.Chdir(path)
cmd := exec.Command("rxvt")
cmd.Start()
}
func main() {
session("/var/log")
session("/home")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment