You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I feel like we are answering the same question over and over on support for shell characters like * and | in run (see e.g. here and here and here and here, and it would be nice to have a succinct FAQ entry to point people to.
IMO, we shouldn't suggest run(`sh -c "..."`) as a "workaround" to not having native piping/IO redirection in cmd literals and instead directly insert e.g. run(pipeline(`ls`, "out.txt")) here. It's safer, as it doesn't go through a shell for actual shell evaluation, thereby losing safety advantages granted by cmd literals in the first place.
It's not suggested as a "workaround" (that word is not used!). The FAQ entry heavily recommends using pipeline and Glob.jl, and emphasizes the downsides of the shell. But I think it's also important to say that sh -c "..." is what functions like os.system("...") are really doing in other languages, and of course you can do that too in Julia if you want.
But I'll edit it to include the Julia-native version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmdRelates to calling of external programsdocsThis change adds or pertains to documentation
4 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I feel like we are answering the same question over and over on support for shell characters like
*and|inrun(see e.g. here and here and here and here, and it would be nice to have a succinct FAQ entry to point people to.