I'm trying to get a string returned into a variable in WIndows batch by using SET.
The command I'm running is:
for /f %i in (22NRmeta.txt) do symaccess -sid 22 list -type stor -dev %i -v | set %m = (findstr "Masking View Names") | echo %i % m >> 22PerDEV_ViewCount.txt
The issue is this: variable %m is returned to console as "%m" and not the result of findstr "Masking View Names")
Sample result returned to file below:
0BEC % m
0BF5 % m
0BFE % m
0C07 % m
0C10 % m
How do I get the result of findstr to echo to the file? Thanks folks!!
No, that doesn't work that way at all. You can't use the output of other commands directly to set a var, you'll need another FOR /F:
(CODE)Though it would be much better write to the file only once (much
In this guide, I outline 7 key steps to help technology professionals grow their careers. Whether you have been working in technology for 10 years or for 10 days, follow these steps to help you achieve your career goals and pursue your passions.
Learn the basics of lists in Python.
Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing.
Set up your basic HTML file. Open your form tag and set the method and action attributes.:
Set up your first few inputs one for the name and …