ppnehe
September 17, 2021, 7:07am
#1
hi
In Linux Basics Course - IO Redirection - Command Lines Pipes I have following query
There is file smple.txt which does not have word Hello but it does have hello with h as small.
So when we grep Hello sample.txt ( without use of -i ) is it possible that the grep will return result as Hello as shown in this example ?
My view is the way shown in this example Hello There ! will not come as output of grep command
Kindly correct me if I am missing anything.
with best regards
Pradeep Nehe
tgp
September 18, 2021, 6:08am
#2
@ppnehe , This screenshot will explain how grep works in a different manner.
ppnehe
September 18, 2021, 6:13am
#3
Yes Sir ,
I have understood your example and use of -i which ignores the case .
My view is in the course the sample.txt file does not contain Hello with capital H .
Hence even if we use -i still Hello will not be printed as this file contains only small h .
Please correct me if I am missing anything.
with best regards
Pradeep Nehe
tgp
September 19, 2021, 9:23am
#4
@ppnehe , grep with i option is to ignore the case( whether it is capital or small letter ).