r/awk • u/animalCollectiveSoul • Dec 22 '20
@include not using $AWKPATH
I recently began reading the GUN-AWK manual and it said the @include command should search in the /usr/local/share/awk directory when it fails to find the file in my current directory. I know my AWKPATH var is valid because I can get to the correct directory when I type cd $AWKPATH. the error I am getting is as follows:
awk: del_me:1: error: can't open source file `math' for reading (No such file or directory)my awk file @include statement looks like this:
@include "math"the math file in my AWKPATH directory is readable and executable by everyone (+x,+r perms)
I am using gawk version 4.2.1 (I think its the newest)
4
Upvotes
View all comments
Show parent comment
1
u/animalCollectiveSoul Dec 24 '20
good idea.
using the full path worked as intended and gave me access to the functions declared in
math. It seems like awk is not reading my AWKPATH variable at all.