BLD_NUM via awk or perl
Trying to grab the build number out of my autogenerated file:
awk is easy:
Perl runs outside of cygwin, so I went for this instead:
#define BLD_MAJOR 1
#define BLD_MINOR 5
#define BLD_STAMP 0
#define BLD_NUM 4541
#define BLD_STR "1.05.00.4541"
#define BLD_VAL 105004541L
awk is easy:
awk '/BLD_NUM/ {print $3}'
Perl runs outside of cygwin, so I went for this instead:
perl -lane 'if ($F[1]=~/BLD_NUM/){ print $F[2];}'
Labels: programming, scripts
0 Comments:
Post a Comment
<< Home