Skip to content

How to set a variable to the first *.md file in my current directory? #1605

Answered by runeimp
halloleo asked this question in Q&A
Discussion options

You must be logged in to vote

I don't believe Just has a function for that. So needs to shell-out with backticks to do something like that. This should work for most POSIX systems.

input := `ls *.md | head -1`

first-recipe:
    echo {{input}}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by halloleo
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