cp | greb


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting cp | greb
# 22  
Old 07-09-2012
Red part is matching "16":
Code:
/^(10:|1[0123456]:|15:[012]|15:30)/

To match only until 15, use:
Code:
/^(10:|1[012345]:|15:[012]|15:30)/

# 23  
Old 07-09-2012
Of course... Smilie

So how does AWK knows the minutes then. as we have 6,7,8,9 are also used?
# 24  
Old 07-09-2012
This part 10:|1[0123456]:|15:[012] is matching only the "hour part". 1[0123456]: could be translated to: 10:|11:|12:|13:|14:|15:|16:
# 25  
Old 07-09-2012
Quote:
Originally Posted by bartus11
This part 10:|1[0123456]:|15:[012] is matching only the "hour part". 1[0123456]: could be translated to: 10:|11:|12:|13:|14:|15:|16:
But having that said, isn't some of the code double?
# 26  
Old 07-09-2012
In case of this line, yes:
Code:
10:|1[0123456]:|15:[012]

but not in case of that one:
Code:
09:|1[0123456]:|15:[012]

# 27  
Old 07-09-2012
Quote:
Originally Posted by bartus11
In case of this line, yes:
Code:
10:|1[0123456]:|15:[012]

but not in case of that one:
Code:
09:|1[0123456]:|15:[012]

ok! Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question