I am shell scripting in Windows Server 2003/xp.
A user of my script could set a path into the variable am_path wrongly.
For example
Code: Select all
set am_path=some"wrongPathwithQuotes
So I need to check what he set later from within the script.
In order to do that I need to put the contents of am_path into a text file for find does not work in a search containing quotes to begin with and findstr also needs a text file.
However, echoing variable contents into a text file only works if that variable contains an even number of quotes.
This will not work for example with am_path as set above but will rather echo on the console:
Code: Select all
echo %am_path%>c:\tmp\path2BeChecked.txt
Would somebody know how I could put the contents of a variable that contains an uneven number of quotes into a text file?
Thank you.
Andreas