Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why not use @ECHO OFF? #868

Closed
daxgames opened this issue Mar 3, 2016 · 5 comments
Closed

Why not use @ECHO OFF? #868

daxgames opened this issue Mar 3, 2016 · 5 comments

Comments

@daxgames
Copy link
Member

daxgames commented Mar 3, 2016

This is more of a question than an issue.

Why do we litter cmd and bat files with useless @ signs to turn off command echo per line instead of just putting @echo off as the first line of the file?

@jankatins
Copy link
Contributor

I tink mainly because using echo off would also set echo off in the following cmd session.

@daxgames
Copy link
Member Author

daxgames commented Mar 5, 2016

I might try that and see. Not sure that's true.

On March 4, 2016 7:40:15 PM Jan Schulz notifications@github.com wrote:

I tink mainly because using echo off would also set echo off in the
following cmd session.


Reply to this email directly or view it on GitHub:
#868 (comment)

@daxgames
Copy link
Member Author

daxgames commented Mar 6, 2016

Tested, verified safe, and implemented in #873.

@daxgames
Copy link
Member Author

daxgames commented Mar 6, 2016

Fixed in #873

@daxgames daxgames closed this as completed Mar 6, 2016
@glucas
Copy link
Contributor

glucas commented Mar 28, 2016

I like this pattern for bat files etc:

@echo off
@if not "%ECHO%"=="" echo %ECHO%

By default echo is off, but it makes debugging easy as you can temporarily 'set ECHO=on' in your shell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants