What is the function of [0-9]* in the following statement, which will write all lines that start with an even number, followed by a space, to the file even:
sed -n 's/^[0-9]*[02468] /&/w even' <file
Then, eliminating [0-9]*
will have the same function/output. In other words, both statements are the same effect.
sed -n 's/^[02468] /&/w even' <file
Is [0-9]*
useless here? I am really confused. Please help me.