Welcome to iraf.net Tuesday, May 07 2024 @ 12:53 AM GMT
Jason Quinn |
12/01/2012 09:27AM (Read 1488 times)
|
|
|
Status: offline
Registered: 04/07/2006
Posts: 175
|
In [b:be30d322f1]mkpkg[/b:be30d322f1] in [b:be30d322f1]pkg/vocl[/b:be30d322f1], I noticed these two lines:[code:1:be30d322f1]!egrep -v "\<stdlib.h\>" y.tab.c > ytab.c;
!egrep -v "\<stdio.h\>" ytab.c > ntab.c; mv ntab.c ytab.c[/code:1:be30d322f1]could be replaced with[code:1:be30d322f1]!grep -E -v "\<std(lib|io)\.h\>" y.tab.c > ytab.c[/code:1:be30d322f1]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".
|
|
|
|
| |
|
Content generated in: 0.02 seconds |
|