This project has moved and is read-only. For the latest updates, please go here.
4
Vote

Command-line piping issues

description

Hi,

Great tool, really like it. Small issue regarding piping and the --silent switch. Piping to nul only seems to work 90% of the time, at random cases in a batch process it will still output the huge status/result text. Adding the --silent switch prevents this, but when this happens the tool still echo's a blank newline to the console.

It is minor I know, but it does mess with batch processing display and/or logfile output.

Thanks!

comments

ericpopivker wrote Mar 24, 2014 at 11:31 AM

Hi,

Can you provide example of piping that your are trying to do?

Also attach actual and expected output.

Eric

VishuP wrote Jul 10, 2014 at 7:01 AM

Hi,

Have this problem even without piping, the command in a batch file like below.

"tools\fnr.exe" --cl --silent --dir "\res" --fileMask "VPout.txt" --excludeFileMask ".dll, .exe" --useRegEx --find "<Id>{[A-Z,0-9]{8}-[A-Z,0-9]{4}-[A-Z,0-9]{4}-[A-Z,0-9]{4}-[A-Z,0-9]{12}}<" --replace "<Id>{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}<"

My process invokes similar batches several time with the file name (in this case "VPout.txt") being different each time.
Also I noticed the console to which it echo is the one from which my root process is invoked.

Thanks for the great tool though...

Vish

gatsmaps wrote Jul 30, 2015 at 9:27 PM

Hi,

I have the same issue...

Example of my batch file...

Echo Comment 1
Echo Comment 2
fnr.exe --cl --dir "C:\SQLMOVE" --fileMask "SQLMOVE.sql" --find "C:\SQL2012" --replace "E:\SQL2012" --silent
Echo Comment 3
Echo Comment 4


Actual output result...

Comment 1
Comment 2

Comment 3
Comment 4


Expected output result...

Comment 1
Comment 2
Comment 3
Comment 4


I tried to put ">nul" or "2>nul" or ">nul 2>nul" at the end of the line (the line with fnr.exe command), but I still have that blank line at the console.

It is minor I know, but it is annoying

Beside, it is a great tool. A must have.

theGrumpyScot wrote Jun 8, 2016 at 4:44 PM

fnr.exe ...  --silent 2>&1 > nul
and the tool still manages to output blank lines to the console - irritating, as we have a complex batch system which is outputting a number of steps - for these to be separated with often multiple blank lines makes things a little more confusing for the end-user.