mkpkg command suggestion
Jason Quinn wrote on Dec 01, 2012
In mkpkg in pkg/vocl, I noticed these two lines:
could be replaced with
The main advantage is higher clarity through avoidance of temporary files while also reducing 3 processes to 1. This also avoids potential clobber issues with the mv. The change to "grep -E" from "egrep" is because "egrep" is deprecated by GNU and considered historical by POSIX. The period should be escaped so that it's a literal period instead of the regex "any character".
!egrep -v "\<stdlib.h\>" y.tab.c > ytab.c;
!egrep -v "\<stdio.h\>" ytab.c > ntab.c; mv ntab.c ytab.ccould be replaced with
!grep -E -v "\<std(lib|io)\.h\>" y.tab.c > ytab.cThe main advantage is higher clarity through avoidance of temporary files while also reducing 3 processes to 1. This also avoids potential clobber issues with the mv. The change to "grep -E" from "egrep" is because "egrep" is deprecated by GNU and considered historical by POSIX. The period should be escaped so that it's a literal period instead of the regex "any character".
Last post on Dec 01, 2012