Welcome to iraf.net Tuesday, May 07 2024 @ 12:53 AM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 mkpkg command suggestion
   
Jason Quinn
 12/01/2012 09:27AM (Read 1488 times)  
+++++
Active Member

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".

 
Profile Email
 Quote
   
Content generated in: 0.02 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login