No empty .Rs/.Re
[netbsd-mini2440.git] / sbin / mount_portal / examples / sysctlfs.sh.sh
blob15f697f8e86fb0343766533695ac09115ac3c924
1 #!/bin/sh
2 ## $NetBSD: sysctlfs.sh.sh,v 1.1 2001/12/11 15:35:53 bgrayson Exp $
3 ## Fast hack at a sysctl filesystem. The path can be either in
4 ## dot-style (kern.mbuf.msize) or in slash-style (kern/mbuf/msize).
5 ## Hacked as an example by Brian Grayson (bgrayson@NetBSD.org) in Sep 1999.
6 for path in $*; do
7 ## First, change any slashes into dots.
8 path=`echo $path | tr '/' '.'`
9 ## Now invoke sysctl, and post-process the output to make it
10 ## friendlier. In particular:
11 ## 1. Remove the leading prefix.
12 ## 2. Remove a now-leading ".", if any.
13 ## 3. If we are left with " = <val>", strip out the " = " also.
14 sysctl $path | sed -e "s/$path//;s/^\.//;s/^ = //"
15 done