Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
8ytecoder
4y ago
0 comments
Save
Share
I use this a lot in my scripts - handy when you want to capture the output or execute a command in a different directory.
0 comments
1 comments · 1 top-level
top
newest
oldest
lytedev
4y ago
set output (echo captured) echo $output > captured
And if you wanna run a command in another dir:
pushd other_dir run_command popd
j
/
k
navigate · click thread line to collapse