Awk - A nifty little tool for text manipulation and more.

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
berserker
Posts: 95
Joined: 18 Dec 2013 00:51

Re: Awk - A nifty little tool for text manipulation and more

#31 Post by berserker » 09 Jan 2014 02:59

Endoro wrote:We cannot get the cmd %ERRORLEVEL% here.

defined explicit exit if you want

Code: Select all

C:\> awk "BEGIN{ if ((\"ddd\" | getline) <= 0 ) exit(-1) ;   }"  2>nul
C:\>echo %errorlevel%
-1

Post Reply