Computer Programming
Definitions

What is the difference between rem and echo in batch?

123

Top Answer
User Avatar
Wiki User
Answered
2009-05-01 16:31:10
2009-05-01 16:31:10

rem is a comment that is only seen if you edit the batch

echo actually is printed when the batch is running

001
๐ŸŽƒ
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
๐Ÿ˜‚
0
User Avatar

Related Questions


There are two ways of adding comments. The first is to use the REM command. The second is to use ::. Example: echo Hello REM This is a comment echo Hi :: This is also a comment


Use the following batch file REM This batch file is used to start/stop the oracle instance REM Simply invoke oracle.bat start/stop cls @ECHO off REM ****************************************************************** REM ** Batch file used to stop/start oracle services REM ****************************************************************** if(%1)==(start) GOTO START if(%1)==(stop) GOTO STOP echo Invalid use. Usage is oracle.bat stop/start GOTO END :START REM ** START the oracle services echo Starting Oracle Services REM change the instance/listener names to match what is in your services list NET START "OracleOraDb11g_home1TNSListener" NET START "OracleServiceINNOVATEST" NET START "Oracle INNOVATEST VSS Writer Service" NET START "OracleDBConsoleInnovaTest" NET START "OracleJobSchedulerINNOVATEST" echo Oracle Services Started GOTO END :STOP echo Stopping Oracle Services REM change the instance/listener names to match what is in your services list NET STOP "Oracle INNOVATEST VSS Writer Service" NET STOP "OracleDBConsoleInnovaTest" NET STOP "OracleJobSchedulerINNOVATEST" NET STOP "OracleOraDb11g_home1TNSListener" NET STOP "OracleServiceINNOVATEST" echo Oracle Services Stopped GOTO END :END maovandara


echo "Enter A Number :" read n r=n s=0 rem=0 while [ $n -gt 0 ] do rem=$(($n%10)) s=$(($s+$rem*$rem*$rem)) n=$(($n/10)) done if [ $r -eq $s ] then echo "The Number is Avogadro" else echo "The Number is Not Avogadro" fi


i=2 rem=1 echo "Enter a number" read num if [ $num -lt 2 ] then echo "$num is not prime" exit 0 fi while [ $i -le `expr $num / 2` -a $rem -ne 0 ] do rem=`expr $num % $i` i=`expr $i + 1` done if [ $rem -ne 0 ] then echo "$num is prime" else echo "$num is not prime" fi


echo -n "Enter numnber : " read n rem=$(( $n % 2 )) if [ $rem -eq 0 ] then echo "$n is even number" else echo "$n is odd number" fi


i=2 rem=1 echo -e "Enter a number: \c" read num if [ $num -lt 2 ]; then echo -e "$num is not prime\n" exit 0 fi while [ $i -le `expr $num / 2` -a $rem -ne 0 ]; do rem=`expr $num % $i` i=`expr $i + 1` done if [ $rem -ne 0 ]; then echo -e "$num is prime\n" else echo -e "$num is not prime\n" fi


cho "Enter A Number :" read n r=n s=0 rem=0 while [ $n -gt 0 ] do rem=$(($n%10)) s=$(($s+$rem*$rem*$rem)) n=$(($n/10)) done if [ $r -eq $s ] then echo "The Number is Avogadro" else echo "The Number is Not Avogadro" fi


#!/bin/sh i=2 rem=1 echo -e "Enter a number: \c" read num if [ $num -lt 2 ]; then echo -e "$num is not prime\n" exit 0 fi while [ $i -le `expr $num / 2` -a $rem -ne 0 ]; do rem=`expr $num % $i` i=`expr $i + 1` done if [ $rem -ne 0 ]; then echo -e "$num is prime\n" else echo -e "$num is not prime\n" fi


It depends on what you want to do lets say you want to say something you use a command. ok first off you always need to start the file with @echo off next you want to make it say something with echo so now i have @echo off echo (text goes here) you can modify this so it can go to that begging again , make it green, and delete this text that is spamming the program so you should have: @echo off---> shows you no cmds with it without it you will see the word echo (text goes here) rem start---> makes you a link so you can refer to it with the goto start command :start------>sends you to this link cls-------------> clears screen in program color 0a---------->green echo (msg here)-> shows text that you write there are many more you just have to look them up on youtube an specify what you want to do what i wrote can make you a real ministure begginer batch file like this. copy this into notepad save somewhere as a .bat at the end @echo off rem start :start cls color 0a echo yay pause echo you pause echo did pause echo it pause echo!! pause goto start


in rem jx allows a court jurisdiction over any person with respect to a particular item of propery. quasi in rem exists when the court has power over specific persons with respect to specific property under the plaintiff's control


One is Non-Rapid eye movement, the other is Rapid eye movement. Other than the fact your eyes rapidly move in REM sleep and don't in NREM sleep the key difference is that it is accepted that the only time one dreams is during REM.


Anytime you wish to create any type of remark in a batch file rem must be added in front of the line. Remarks are often used to skip a line in the batch file or make comments.


8 hrs so looks like rem wins the bet.


<?php for($i=1; $i<=1000; $i++) { $num=$i; $sum=0; while($num>=1) { $rem=$num%10; $qub=$rem*$rem*$rem; $sum=$sum+$qub; $num=$num/10; } if($sum==$i) { echo("<br>$sum"); } } ?> visit: http://tutorial.planetetutors.com


The Rad is a unit of ionizing radiation, measuring its energy distribution in air. A Rontgen is similar, but it measures the energy absorbed by an object. A REM is a Rontgen Equivalent Man, so it measures the energy absorbed by a human being.


// recursive implementation of factorial function long factorial(const int n) { if(n <= 1) { return 1L; } return n * factorial(n-1); } @echo off echo RECURSE.BAT echo This demonstrates recursion echo To run this, save this into a document on your desktop named RECURSE.BAT then double click call :func 5 echo All done. pause goto :eof rem Functions begin here :func rem Variables in this language are globally scoped. SETLOCAL makes the variable scope local. setlocal set /a nextlevel=%1 - 1 echo Start Level=%1 - Next level= rem Here is our recursive call. Note that we only call recursively if the next level is greater than or equal to 1 ifgeq 1 call :func echo End Level=%1 endlocal goto :eof


Could be : Rapid Eye MovementCould be : RemingtonIt's a command commonly found in windows batch files, or the BASIC programming language. REM is short for REMark It is used to add comments to code that will be ignored by the compiler/interpreter. Cheers Neil http://www.spellings.net


The plural form of rem is rem.Ex: I have a lifetime dose of 3 rem.


REM rebound involves the tendency for REM sleep to increase following REM sleep deprivation.


REM REM REM Daniel powder


Yes you can have a running batch file continue in another batch file, by getting it to call itself with an argument. To call itself use %0 (and think it is best to use one of CALL or START (command) or maybe CMD) To analyze arguments (the first one) do code like: if %1TRICK==TRICK goto nomore rem start of do stuff


Batch files must be saved in ANSI format because that's the only format the CMD shell natively supports. If you save the file in any one of the Unicode formats (UTF8, UTF16, etc) the batch will not execute or will execute up until the first unrecognised symbol, especially if the file also contains a byte-order-mark (BOM). While the batch file itself must be encoded in ANSI, that does not mean you are limited to just 256 characters. By changing the code page, the same encoding can represent any character you want, you simply need to know in which code page it resides. Whilst editing your batch file, there can only be one code page in effect so any characters you've already entered using a different code page may not display correctly. However, this effect is temporary since changing the code page doesn't change the encoding, it only changes the way that encoding is interpreted by your text editor. Your batch file will also need to include the CHCP command to change the console code page accordingly as it is executed. However, before you switch code pages, remember to save the current code page so that you can restore it when you're done. This is particularly important if your batch file might be invoked as part of another batch file. If you don't restore the code page, the other batch file may not work as intended. Also, never assume that the current code page is always going to be the system default code page because the default depends on the locale. Always leave things exactly as you found them. As an example, suppose we wish to display the full range of box drawing characters found in code page 437. Here's how our code will appear in the editor: @ECHO OFF REM Save the current code page. FOR /F "tokens=*" %%A IN ('CHCP') DO FOR %%B IN (%%~A) DO SET codepage=%%B CHCP 437 > NUL ECHO ÉÍËÍ» ÚÄÂÄ¿ ÖÄÒÄ· ÕÍÑ͸ ECHO º º º ³ ³ ³ º º º ³ ³ ³ ECHO ÌÍÎ͹ ÃÄÅÄ´ ÇÄ×Ķ ÆÍØ͵ ECHO º º º ³ ³ ³ º º º ³ ³ ³ ECHO ÈÍÊͼ ÀÄÁÄÙ ÓÄÐĽ ÔÍÏ; REM Restore the original code page. CHCP %codepage% > NUL Don't worry about all the hieroglyphics, that's simply how Windows-1252 interprets the encodings and is how Windows Notepad will display your batch file. To see the correct symbols you will need to use an editor that supports OEM-US encoding such as Notepad++. When you execute this batch file, you should see the following output: ╔═╦═╗ ┌─┬─┐ ╓─╥─╖ ╒═╤═╕ ║ ║ ║ │ │ │ ║ ║ ║ │ │ │ ╠═╬═╣ ├─┼─┤ ╟─╫─╢ ╞═╪═╡ ║ ║ ║ │ │ │ ║ ║ ║ │ │ │ ╚═╩═╝ └─┴─┘ ╙─╨─╜ ╘═╧═╛


1001001010101 2346 ÷ 2 = 1173 Rem. 0 1173 ÷ 2 = 586 Rem. 1 586 ÷ 2 = 293 Rem. 0 293 ÷ 2 = 146 Rem. 1 146 ÷ 2 = 73 Rem. 0 73 ÷ 2 = 36 Rem. 1 36 ÷ 2 = 18 Rem. 0 18 ÷ 2 = 9 Rem. 0 9 ÷ 2 = 4 Rem. 1 4 ÷ 2 = 2 Rem. 0 2 ÷ 2 = 1 Rem. 0 1 ÷ 2 = 0 Rem. 1


#include(stdio.h)#include(conio.h)int main( ){int no, temp, rem, sum;clrscr( );printf("Armstrong numbers between 1 and 1000 are:\n");for(no=1; no{temp=no;sum=0;while(temp>0){rem=temp%10;sum=sum+(rem*rem*rem);temp=temp/10;}if(no==sum)printf("\n%d", no);}getch( );return 0;}


Very recent research suggests that dreams that occur during REM sleep tend to be more agitated and troubled than dreams that occur during non-REM sleep. More research is being done to better understand the difference.



Copyright ยฉ 2020 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.