In my DOS batch file, I use the “@” symbol to suppress the echo of that statement before execution when echo is ON.
How should I force the echo of a statement when echo is OFF (I’m hoping for another single character, but all answers welcome)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It seems to me that there is no way to do it. You can wrap commands you need to be echoed between
echo onand@echo offbut this is ugly, I think. Another option is to keepecho onand use@for every command you don’t want to echo and keeping echo-ables without@.