help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setting a variable to be the result of severla shell commands...


From: richard offer
Subject: Re: setting a variable to be the result of severla shell commands...
Date: Tue, 25 Jun 2002 07:23:54 -0700

* frm address@hidden "06/25/02 00:41:20 -0400" | sed '1,$s/^/* /'
*
* 
* Why not just write it in a longer $(shell ...) function?  One of the
* nicest things about Bourne shell, unlike the horrible C shell, is that
* you can write just about any script without needing newlines at all.
* 
* Why not something like (note, entirely untested...):
* 

Thanks for the idea...

Here's the working code...

build-ver=$(strip $(1)build$(shell n=$(shell \
  ( [ -f .build_num ] &&  expr `cat .build_num` + 1 ) \
  || echo 1 ) ; echo $$n>.build_num; echo $$n ))

REL:=$(call build-ver,4)


I'm sure someone can optimize it more than that, but it's giving me
something to play with, thanks

richard.


-- 
-----------------------------------------------------------------------
Richard Offer                     Technical Lead, Trust Technology, SGI
"Specialization is for insects"
_______________________________________________________________________




reply via email to

[Prev in Thread] Current Thread [Next in Thread]