Date: Fri, 21 Jan 2000 00:20:57 -0500 From: "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com> To: Ben Smithurst <ben@scientia.demon.co.uk> Cc: cjclark@home.com, freebsd-questions@FreeBSD.ORG Subject: Re: sh(1) Messing with My Mind Message-ID: <20000121002057.I73715@cc942873-a.ewndsr1.nj.home.com> In-Reply-To: <20000121001756.A25494@strontium.scientia.demon.co.uk>; from ben@scientia.demon.co.uk on Fri, Jan 21, 2000 at 12:17:56AM %2B0000 References: <867h6j$1kk4$1@atlantis.rz.tu-clausthal.de> <200001202140.WAA05161@dorifer.heim3.tu-clausthal.de> <20000120175518.F72914@cc942873-a.ewndsr1.nj.home.com> <20000121001756.A25494@strontium.scientia.demon.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jan 21, 2000 at 12:17:56AM +0000, Ben Smithurst wrote: > Crist J. Clark wrote: > > > And although it does not impact me, there is another reason, and one > > of the best ones, that someone would rather pipe to read than > > backtick, > > > > (3) The backticked argument cannot have nested backticks. > > ben@strontium:~$ echo `ls \`pwd\`` > .ICEauthority .KillLog .MsgLog .Xauthority .Xresources [snip] > > oh yes it can. :-) I guess I wrote too quickly. I knew you could escape them. I should have said, (3) Nesting backticks can be done if one is insane. [snip] > > Anyway, I guess I need to find a workaround. I figured I was missing > > something obvious (something I already knew). Thanks for pointing it > > out. > > hmm.. if the output is like "4 Fri 21 Jan 2000 00:15:59 GMT" as you say, > then how about > > DATA=`awk whatever` > set -- $DATA > NUM=$1 > shift; DATE="$*" > > would that work? It would, but I've already got argv filled with something else. I guess I could swap them. But since we're having so much fun with all of this, maybe I should try this one on all of you. Given Ben's code above, how would _you_ determine how long ago $DATE was from the present time? Better yet, I'll tell you all what that whole argument line is. That first number is a dump level and the second is the date of the dump. The script needs to figure out if we need to dump and at what level. That awk script is taking the staggeringly useless "inventory" output from the SGI xfsdump(8) command (the -I option) and distilling the last dump for a given filesystem. That all works, but is only the start of the fun. -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000121002057.I73715>