Skip to content

Changing the signature of the write- commands #287

@Russell-Jones-OxPhys

Description

@Russell-Jones-OxPhys

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions