Grep using Regex
grep '2018-03-20 15:55.*ERROR' wso2is-5.0.0/repository/logs/wso2carbon.log
Grep & return line number
grep -n '17:01:39,266' *.c wso2is-5.0.0/repository/logs/wso2carbon.log
RESULT- wso2carbon.log:2776828
Grep & export selected lines range
sed -n '2776828,3015070 p' wso2is-5.0.0/repository/logs/wso2carbon.log > wso2carbon.log_ERROR_LOG
grep '2018-03-20 15:55.*ERROR' wso2is-5.0.0/repository/logs/wso2carbon.log
Grep & return line number
grep -n '17:01:39,266' *.c wso2is-5.0.0/repository/logs/wso2carbon.log
RESULT- wso2carbon.log:2776828
Grep & export selected lines range
sed -n '2776828,3015070 p' wso2is-5.0.0/repository/logs/wso2carbon.log > wso2carbon.log_ERROR_LOG