func NewMoveTask(t goauto.Transformer) goauto.Tasker {
	return goauto.NewTask(t, move)
}
NewMoveTask returns a goauto.Tasker which will rename a file from goauto.TaskInfo.Target to transform(goauto.TaskInfo.Src)
goauto.TaskInfo.Target is set to transform(goauto.TaskInfo.Src)
package shelltask
import (
	"fmt"
	"io"
	"os"
	"os/exec"
	"time"
	"github.com/dshills/goauto"
)
type shellTask struct {
	cmd       string
	args      []string
	transform goauto.Transformer
}
func NewShellTask(cmd string, args ...string) goauto.Tasker {
	return &shellTask{cmd: cmd, args: args, transform: goauto.Identity}
}
func NewShellTaskT(transform goauto.Transformer, cmd string, args ...string) goauto.Tasker {
	return &shellTask{cmd: cmd, args: args, transform: transform}
}
func (st *shellTask) Run(info *goauto.TaskInfo) (err error) {
	t0 := time.Now()
	info.Target = st.transform(info.Src)
	info.Buf.Reset()
	targs := append(st.args, info.Target)
	cmd := exec.Command(st.cmd, targs...)
	cmd.Stdout = &info.Buf
	cmd.Stderr = info.Terr
	defer func() {
		fmt.Fprint(info.Tout, info.Buf.String())
		if err != nil && info.Verbose {
			t1 := time.Now()
			fmt.Fprintf(info.Tout, ">>> %v %v %v\n", st.cmd, st.args, t1.Sub(t0))
		}
	}()
	err = cmd.Run()
	return
}
func NewCatTask(t goauto.Transformer) goauto.Tasker {
	return goauto.NewTask(t, cat)
}
func cat(info *goauto.TaskInfo) (err error) {
	in, err := os.Open(info.Target)
	if err != nil {
		return
	}
	defer func() {
		err = in.Close()
	}()
	info.Buf.Reset()
	_, err = info.Buf.ReadFrom(in)
	if err != nil {
		return
	}
	fmt.Fprint(info.Tout, info.Buf)
	if err != nil && info.Verbose {
		fmt.Fprintf(info.Tout, ">>> cat %v", info.Target)
	}
	return
}
func NewRemoveTask(t goauto.Transformer) goauto.Tasker {
	return goauto.NewTask(t, remove)
}
func remove(info *goauto.TaskInfo) (err error) {
	err = os.Remove(info.Target)
	if err != nil && info.Verbose {
		fmt.Fprintf(info.Tout, ">>> Remove %v", info.Target)
	}
	return
}