I'm very early in trying to learn nushell, sorry! … I'd like to build a table with all the recursively found ".swift" source files in a folder, and then append an additional column that contains their (computed) line count.
- I've used this answer which has an approach to finding all files with
ls **/*.swift
. - I've used this answer which has an approach to adding a computed column to a table with
insert
.
This has lead me to try out:
ls **/*.swift | insert lineCount { wc -l $in.name }
However, this does not seem to work. It's printing a lot of stuff, but it seems to be chunks of table output interspersed with chunks of wc
output.
Thank you.