Batch To Bash Conversion

Posted by Steven on Stack Overflow See other posts from Stack Overflow or by Steven
Published on 2012-12-16T04:19:19Z Indexed on 2012/12/16 5:04 UTC
Read the original article Hit count: 149

Filed under:
|

I need to know this Batch Script into Bash :

@echo off
set /p name= Name? 
findstr /m "%name%" ndatabase.txt
if %errorlevel%==0 (
cls
echo The name is found in the database!
pause >nul
exit
)
cls
echo.
echo Name not found in database.
pause >nul
exit

I am new to the Linux Kernel, so starting off with an easy distro - Ubuntu 12.10. My problem is that I do not really know much of Bash Script, since I am very accustomed to the Batch Script format; which is obviously a bad habit for my C++.

© Stack Overflow or respective owner

Related posts about bash

Related posts about batch