What is the use of ? in grep command.. And practical use
Fresh3 days ago
Mar 15, 202622158 viewsConfidence Score0%
0%
Problem
I tried to find the actual practical use of ? i.e. for e.g. "egrep a? filename" but was not able to find any.. It returns all results.. So, Please help me out wherein i could know the actual use of egrep ? command.. If i use 'a?', it returns all result i.e. strings or lines. which has 0 a's, 1 a's,…
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: What is the use of ? in grep command.. And practical use
Low Risk
Say you wanted to match numeric assignment expressions like this in a script: where some numbers are negative and have a minus sign: You could use this: The question mark makes the minus optional. (I don't think plain grep supports or , hence ).
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix