Open or-shachar opened 1 year ago
Yes. Would it be something like?
junit2html < *.xml > test-report.html
Not sure how this can be read through STD.in It might require to switch to flag with comma delimited. But I'll check if your way is feasible as it's more elegant.
Unfortunately writing the following project reveals that this usage will not work:
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
fmt.Println(scanner.Text())
}
}
Test file:
echo "aaaaa
aaaaa
aaaaa
aaaaa" > a.temp
echo "bbbb
bbbb
bbbb
bbbb" > b.temp
go run . < *.temp
bash just doesn't like the expression it will return:
$ bash test.sh
test.sh: line 12: *.temp: ambiguous redirect
zsh will work with the exression but there isn't any way to diffrentiate between the files:
$ zsh test.sh
aaaaa
aaaaa
aaaaa
aaaaa
bbbb
bbbb
bbbb
bbbb
I've prepared something that works with glob patterns...
I still want to clean it up so it won't have multiple for lines but would love to know what you think...
I can probably work on that on a fork and if you agree you can adopt it 🙏