Difference between revisions of "Troubleshooting"

From Jesse's Wiki
Jump to navigation Jump to search
m
Line 33: Line 33:
=== Bash Shell ===
=== Bash Shell ===
Here's me trying to rename tv shows...
Here's me trying to rename tv shows...
https://wiki.bash-hackers.org/syntax/pattern


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">

Revision as of 20:23, 9 May 2021

This page aims to record the solutions to obscure problems.

GitHub

To delete a release, do not click on "Edit", instead click the release title name. Then the "Delete" button will be available.

Citrix

Use the web version when possible. To download a file, use the "download" icon which should appear. It may not be possible to use the Windows Explorer interface anymore.

HTA

When using HTA to open a vbscipt with cscript.exe, you can communicate directly with the script using the Stdout property. So long as the script was launched using shell.exec method. shell.run method is acceptable but it only returns an error level.

exec method to work needs to have the shell set to an object. blah = shell.exec ( blah blah). Then use blah.Stdout.ReadLine() or ReadAll().

This seems most useful for quick scripts where I want to return a single value. I can't seem to get live updates synchronously with the script as described here

It would be better to have live read outs update to the HTA so the console screen can be avoided entirely, giving the HTA a more "program" feel.


This explains when you want the window to stay open, e.g. use pause for the "press any key to continue" or just keep it alive until they click on the x.


Okay apparently using setInterval in the HTA will allow me to read the Stdout without locking the application...

       setInterval(function(){ document.getElementById(6).innerHTML = blah.StdOut.ReadLine(); }, 1000);

MSDN


But now I can't run the shell minimized or stop it from taking focus.

Run vs Exec comparison [1]

Bash Shell

Here's me trying to rename tv shows...

https://wiki.bash-hackers.org/syntax/pattern

for file in *.mp4; do echo mv "$file" "${file//./ }"; done

for file in *.mp4; do echo mv "$file" "${file//.[!.mp4]/ }"; done

for file in *.mp4; do echo mv "$file" "${file[^.mp4]}"; done

for file in *.mp4; do echo mv "$file" "${file/*.S??E*/ }"; done




for file in *.mp4; do echo mv "$file" "${file/.S??E??*}"; done

for file in *.mp4; do echo mv "$file" "${file/.S??E??*/${file%S??E??}}"; done

for file in *.mp4; do echo mv "$file" "${file%%.S??E??*}"; done

for file in *.mp4; do echo mv "$file" "${file%%\?*}"; done