veganism.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Veganism Social is a welcoming space on the internet for vegans to connect and engage with the broader decentralized social media community.

Administered by:

Server stats:

293
active users

#codinghelp

0 posts0 participants0 posts today
stib<p>Hi <a href="https://aus.social/tags/nerds" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>nerds</span></a>, if I run a <a href="https://aus.social/tags/powershell" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>powershell</span></a> script that takes a directory or a collection of directories as its arguments, the trailing slash in the directory name turns the following single quote into a double quote using evil Microsoft dark magic somehow.<br>If my script is:<br>```<br>param (<br> [string[]]$inDirs<br>)<br>foreach ($dir in $inDirs){<br> write-host $dir<br>}<br>```<br>and I do<br>```<br>pwsh myscript.ps1 'c:\\some\dir\'<br>```<br>The result is <br>```<br>c:\\some\dir"<br>```<br>How do I get it to unescape (or whatever it's doing) the last slash?<br><a href="https://aus.social/tags/AskFedi" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>AskFedi</span></a> <a href="https://aus.social/tags/CodingHelp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CodingHelp</span></a> <a href="https://aus.social/tags/pwsh" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pwsh</span></a></p>
Aleksander Stojanowski<p>It seems to me I’m resolving a problem that should have been resolved ages ago, but I couldn’t find any reasonable solution for the problem. Am I missing something? Any help from fellow <a href="https://iosdev.space/tags/iOSDev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>iOSDev</span></a> and/or <a href="https://iosdev.space/tags/IndieDev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>IndieDev</span></a>? 😅<br><a href="https://iosdev.space/tags/HelpNeeded" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>HelpNeeded</span></a> <a href="https://iosdev.space/tags/DeveloperCommunity" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DeveloperCommunity</span></a> <a href="https://iosdev.space/tags/CodingHelp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CodingHelp</span></a> <a href="https://iosdev.space/tags/AppDev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>AppDev</span></a></p>