lst2str: feature-request - catch stdout

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

lst2str: feature-request - catch stdout

Post by *Jonas »

Hi,

I would find it very useful if one could catch the output of console-applications (the text they are sending to stdout)
Something like this

Code: Select all

Command: c:\WinCmd\tools\lst2str\lst2str.exe /X:"c:\unxutils\usr\local\wbin\egrep.exe"
Parameter: ?/L:%L  /F:"> %Pegrep.txt" /S:"-E \"\"" /E
doesn't work... (/F is append at the end of the exec-string but I don't get a redirect to egrep.txt)
If there is no other way to achieve this I'd suggest to more switches:
/O:[file in which stdout sould be redirect]
/A:[file at which stdout sould be append]
This couls also be helpful for lst2run...

--
Christian, please add '%?' to the parameterplaceholders for direct userinput so one is no longer forced to search the right place in the exec-string like in my example. The parameter could simply be:
/L:%L /F:"> %Pegrep.txt" /S:"-E \"%?\"" /E
Perhaps I'm not the only who could need that ;)
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Jonas

I don't know if I really understand your request. Just try this:


To write the result to a file:

Code: Select all

Command: "C:\WinCmd\tools\lst2str\lst2str.exe" /X:"C:\Windows\system32\cmd.exe"
Parameter: ?/L:%L /S:"/C c:\unxutils\usr\local\wbin\egrep.exe "(\.)+" > %Pegrep.txt"
To show the result in a console window:

Code: Select all

Command: "C:\WinCmd\tools\lst2str\lst2str.exe" /X:"C:\Windows\system32\cmd.exe"
Parameter: ?/L:%L /S:"/K c:\unxutils\usr\local\wbin\egrep.exe "(\.)+"
(the character '.' will be found)

I support your request to add a %? placeholder:

Code: Select all

Command: "C:\WinCmd\tools\lst2str\lst2str.exe" /X:"C:\Windows\system32\cmd.exe"
Parameter: /L:%L /S:"/K c:\unxutils\usr\local\wbin\egrep.exe %?
Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

Post by *Jonas »

Hey, thak you very much! I'll try that as soon I'm at home.

And perhaps we can convince Christian about the %? placeholder :)
Post Reply