Skip to content

<& equivalent for Es #97

Answered by jpco
cattokomo asked this question in Q&A
Mar 13, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

I might be missing something in your question, but <[n=m] is valid syntax (and parses exactly the same as >[n=m], in fact)

; echo {foo >[1=2]}
{%dup 1 2 {foo}}
; echo {foo <[1=2]}
{%dup 1 2 {foo}}

Does the last line of the following example work how you expect?

; echo 'This is some file contents.' > my-file.txt
; cat my-file.txt 
This is some file contents.
; exec {<[3] my-file.txt}
; cat <[0=3]
This is some file contents.

(Note the last line works identically if written as cat >[0=3].)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cattokomo
Comment options

Answer selected by cattokomo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants