Open zulc22 opened 2 years ago
You can use tee
to also print commands to console
You can use
tee
to also print commands to console
At least on Windows, that most definitely does not work. type [file] | busybox tee CON | pfsshell
just prints out all of the text, ignoring whether pfsshell tried to read the line yet or not.
Due to how buffering works it will read as much as possible from the input
@zulc22 it looks like that even tee
is not necessary:
https://github.com/GDX-X/PFS-BatchKit-Manager/blob/main/PFS-BatchKit-Manager/!PFS-BatchKit-Manager.bat#L1182-L1185
maybe @GDX-X can provide more piping examples
echo device !@hdl_path! > "%~dp0TMP\pfs-prt.txt"
echo ls -l >> "%~dp0TMP\pfs-prt.txt"
echo exit >> "%~dp0TMP\pfs-prt.txt"
type "%~dp0TMP\pfs-prt.txt" | "%~dp0BAT\pfsshell" 2>&1 | "%~dp0BAT\busybox" tee > "%~dp0TMP\pfs-prt.log"
@zulc22 I couldn't find how to print the piped commands as they are executed in the console.
if you want to understand how pfsshell works, use it do your commands one by one directly then redo the shema in echo
that you will put in a txt.
like in the example that AKuHAK showed you
Checks
Describe the FR
If you create a "script" for pfsshell and attempt to pipe it in, the prompt is the only thing shown on screen and it doesn't really let the user know what's happening or how much of the script has executed.
cat script.txt | pfsshell
Describe the solution you'd like
Print piped commands as they are executed
Describe alternatives you've considered
No response
Additional context
No response