How to put inner quotes in outer quotes in "for" loop?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
Izya Kurvitch
Posts: 16
Joined: 15 Jul 2019 15:14

Re: How to put inner quotes in outer quotes in "for" loop?

#16 Post by Izya Kurvitch » 22 Mar 2023 14:13

dbenham wrote:
07 Jul 2022 16:28
I am lurking in the shadows. :twisted:

Actually I have found another hobby that has been sucking up my time - VCV Rack, a Eurorack modular synth emulator for the computer. I am learning all I can about synthesis, as well as creating patches that play themselves so I can use them as accompaniment for my Native American flute improvisations. I perform a couple pieces nearly every week in a Virtual Open Mic over Zoom. Many of them I record and mix down and post to YouTube. You can see a bunch at https://www.youtube.com/c/DaveBenhamMusic/videos

A talented person is talented in everything! Like native music especially when indians are playing... «Chirapaq», «Ponchito» and «Naoma» (Water) are my favorite.

Need your help a little, I know it's trifle for you :D ... Trying to write 2nd's cmd window's stdout that starts from 1st cmd to a variable but haven't succeed yet... Seems to me that some redirection with "1", "2", "&" must take place, but don't know how to do it... Here's my trying:

for /f "usebackq tokens=2 delims=: " %i in (`start /i pmon.exe ^|findstr /i "memory"`) do echo %i

Here the 2nd processing cmd line:

Memory: 2000000K Avail: 500000K PageFlts: 15000 InRam Kernel:10000K P:200000K

The result must be "2000000K" in 1st window, 2nd window must be closed. Thanks.



P.S. «Sofia after dark» is so deep... Who is she?

dbenham
Expert
Posts: 2461
Joined: 12 Feb 2011 21:02
Location: United States (east coast)

Re: How to put inner quotes in outer quotes in "for" loop?

#17 Post by dbenham » 23 Mar 2023 07:47

I don't understand what you are trying to do, so I have no idea how to solve your problem.

It sounds like you are trying to communicate between different processes, which would require communication via files. I use that technique in my SNAKE.BAT batch game. Buried in that thread is a description of how the inter-process communication works.

But I don't see how to relate that concept with the minimal code you have posted. So I am at a loss.

....

Sofia is simply the name of the hardware oscillator from Xaos Devices that my patch attempts to emulate. After creating the emulator I was trying to patch up a melody. Using the same patch I came up with two completely different pieces simply by changing the tempo and key (and reverb). The quick one is playfully happy and innocent, hence the name "Sofia on a Sunny Day". The slow one is very dark, so "Sofia After Dark" seemed appropriate.

Izya Kurvitch
Posts: 16
Joined: 15 Jul 2019 15:14

Re: How to put inner quotes in outer quotes in "for" loop?

#18 Post by Izya Kurvitch » 23 Mar 2023 07:58

dbenham wrote:
23 Mar 2023 07:47
I don't understand what you are trying to do, so I have no idea how to solve your problem.

It sounds like you are trying to communicate between different processes, which would require communication via files. I use that technique in my SNAKE.BAT batch game. Buried in that thread is a description of how the inter-process communication works.

But I don't see how to relate that concept with the minimal code you have posted. So I am at a loss.

....

Sofia is simply the name of the hardware oscillator from Xaos Devices that my patch attempts to emulate. After creating the emulator I was trying to patch up a melody. Using the same patch I came up with two completely different pieces simply by changing the tempo and key (and reverb). The quick one is playfully happy and innocent, hence the name "Sofia on a Sunny Day". The slow one is very dark, so "Sofia After Dark" seemed appropriate.

Thank you very much for your answer. The study ff your SNAKE on the my next stage... Your JREPL is very helpful :D !

Post Reply