On Friday 30 November 2007, Max Vozeler wrote: > > Why pipe them and not just pass them as a parameter? > > Call the script as '$i $dev $id "$filesystems"' and in the script have > > 'filesystems="$3"'. > > That's what I tried first. > > I changed to piping because otherwise we'd have to do > comparably complex list comparisons. E.g. either: Hmm. I don't get this. You could still echo back the valid options, same as you do now. You just pass them _in_ as a parameter which avoids the (IMO) ugly 'cat' commands in the veto script. AFAICT my suggestion does not fundamentally change your solution. > > The preferred indentation for case statements is: > > case fs in > > ext2) > > echo $fs > > ;; > > esac > > I personally prefer the style I originally used because > it saves one level of (to me) not meaningful indentation, > but that's a matter of taste. I'm happy to change it :-) No, it does not cost a level of indentation because the conditions are indented by only 4 spaces so their code is still only indented by a single tab. Indenting the conditions by spaces has the advantage that the total case-esac block is better recognizable. This exception to using only tabs for indentation is documented in the D-I coding style document.
Attachment:
signature.asc
Description: This is a digitally signed message part.