userland: add archive tools and pinned GoAWK, esbuild, and QuickJS
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"encoding/csv"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
reader := csv.NewReader(bufio.NewReader(os.Stdin))
|
||||
lines, fields := 0, 0
|
||||
for {
|
||||
row, err := reader.Read()
|
||||
if err == io.EOF {
|
||||
break
|
||||
}
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
lines++
|
||||
fields += len(row)
|
||||
}
|
||||
fmt.Println(lines, fields)
|
||||
}
|
||||
Reference in New Issue
Block a user