Skip to content

how to gather a result of a program? let a = ls not work. #100

@superiums

Description

@superiums

how to gather a result of a program ?

it was able to gather a result of bulitin command like this:

`let a = math@sqrt 8; echo a`

but it fails when the command is another program:

`let a = ls; echo a`
`let a = (ls); echo a`
`let a = date +%s%N; echo a`

after a lot of try, i found that temply solution is to add a builtin command such as `eval or exec or lines:

`let a = ls | eval; echo a`

seems there's a problem to pass some param which contains =

`ls --color=auto`
`'ls --color=auto`

GOT: syntax error: expected end of input

it has to be ls "--color=auto", seems not so compatible...

the single quote was used as spectial punctor, so how to execute commands like awk ?

`cat c | awk '/tags/' `

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions