jbanana: Badly drawn banana (Default)
[personal profile] jbanana
Suppose you want do a thing which needs a directory, and you want to pass it the current directory.

In Bash and other similar shells, you can say something like:
doThing $(pwd)
The dollar-bracket bit is replaced with the output of the command in the brackets.

At the Windows command pompt, you can kind-of do that.
for /f "tokens=*" %G in ('cd') do \@doThing %G
It's not exactly the same. If the command in brackets produces multiple lines, the Windows version will do the thing once per line. The Bash version will do the thing once with lots of params.
(will be screened)
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org

May 2025

M T W T F S S
   1234
5678 91011
12131415161718
19202122232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 20th, 2025 04:22 am
Powered by Dreamwidth Studios