[OpenAFS-devel] interface for vos split

Harald Barth haba@kth.se
Thu, 08 Jan 2009 23:17:32 +0100 (CET)


> shell$ fs getfid /afs/bad-day.42.example.com | awk -F\. '{print $2}'
> 42
> 
> Hilarity ensues.

:)

When you can't solve a problem with awk, apply more awk:

vnode=`fs getfid $3 | awk -F\( '{ print $NF}' | awk -F\. '{print $2}'`

Or fs getfid should have an option to only return the fid and nothing else. 

> In case the above appears overly flippant I suggest it does raise a valid
> UI question.  Namely that if the interface specifies where the split
> occurs by vnode is there any way for the user to get feedback to confirm
> that they got the right number?

Yes, some checking that $vnode does contain something reasonable would
be good.

Harald.