...

Source file src/github.com/codeskyblue/go-sh/example/tail/tailf.go

Documentation: github.com/codeskyblue/go-sh/example/tail

     1  package main
     2  
     3  import (
     4  	"flag"
     5  	"fmt"
     6  
     7  	"github.com/codeskyblue/go-sh"
     8  )
     9  
    10  func main() {
    11  	flag.Parse()
    12  	if flag.NArg() != 1 {
    13  		fmt.Println("Usage: PROGRAM <file>")
    14  		return
    15  	}
    16  	sh.Command("tail", "-f", flag.Arg(0)).Run()
    17  }
    18  

View as plain text