-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
Description
ls -l | mario map 're.split("\s+", x)' write-json
This gives a list of arrays (an array of arrays would seem nicer, but ok)
...
]
[
"drwxr-xr-x",
"6",
"username",
"group",
"4096",
"Jan",
"18",
"2019",
"filename"
]
[
"drwxr-xr-x",
...
ls -l | mario map 're.split("\s+", x)' write-csv-tuples
This splits each item with commas and groups the items in a line with double newlines... Huh?
...
d,r,w,x,r,-,x,r,-,x
6
u,s,e,r,n,a,m,e
g,r,o,u,p
4,0,9,6
J,a,n
1,8
2,0,1,9
f,i,l,e,n,a,m,e
d,r,w,x,r,-,x,r,-,x
...
Ubuntu 18.04 / Python 3.8.0 in a virtualenv without system site packages.