plan9fox/rc/bin/chdev
2022-05-30 21:55:39 -04:00

18 lines
213 B
Bash
Executable file

#!/bin/rc
fn usage {
echo 'usage:' $0 '[ -nr ] devmask' >[1=2]
exit usage
}
op='&'
while(~ $1 -*){
switch($1){
case -n; op='~'
case -r; op='&~'
case *; usage
}
shift
}
echo chdev $op $1 >> '#c/drivers'