From 1c4e1d0a7a6cb65f266fa2caab9abd4d1b9b6da7 Mon Sep 17 00:00:00 2001 From: shreenidhi11 <43963416+shreenidhi11@users.noreply.github.com> Date: Tue, 25 Jul 2023 13:17:16 -0400 Subject: [PATCH] echo: add exit code command (#10538) * echo: add exit code command --------- Co-authored-by: K.B.Dharun Krishna Co-authored-by: Jack Lin Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> --- pages/common/echo.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/echo.md b/pages/common/echo.md index b07a1fb1b8..e44beffd54 100644 --- a/pages/common/echo.md +++ b/pages/common/echo.md @@ -22,3 +22,7 @@ - Enable interpretation of backslash escapes (special characters): `echo -e "{{Column 1\tColumn 2}}"` + +- Print the exit status of the last executed command (Note: In Windows Command Prompt and PowerShell the equivalent commands are `echo %errorlevel%` and `$lastexitcode` respectively): + +`echo $?`