Skip to main content
edited tags
Link
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375
Tweeted twitter.com/StackMma/status/1171664728151744513
Became Hot Network Question
Source Link
George
  • 3.2k
  • 8
  • 22

Using the pipe operator ("|") when executing system commands

I'd like to emulate

ls -tlra | grep <search term>

in Wolfram. I have tried

Module[{},
  SetDirectory[dir]
  RunProcess[{"ls", "-tlra", "|", "grep", <searchTerm>}, "StandardOutput"]
]

which doesn't seem to work. Is there a way to use the "pipe" operator when shelling out commands in Wolfram?