Skip to content
Advertisement

If grep value not found return an echo [korn shell]

I have an issue with this script.

JavaScript

What I’m trying to do is there are 3 conditions: 1- i put a valid input that is found inside the file and it gives me the output

2- I put a wrong input that can’t be found inside the file and give me an output of “Value not Found”

3- I don’t put a value and it says Please enter a valid input.

Advertisement

Answer

JavaScript
Advertisement