Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!clyde!cbosgd!cwruecmp!hal!ncoast!allbery From: allbery@ncoast.UUCP (Brandon Allbery) Newsgroups: comp.unix.questions Subject: Re: Command to obtain current run level? Message-ID: <4102@ncoast.UUCP> Date: Sat, 8-Aug-87 16:38:59 EDT Article-I.D.: ncoast.4102 Posted: Sat Aug 8 16:38:59 1987 Date-Received: Sun, 9-Aug-87 13:41:30 EDT References: <241@acich.UUCP> Reply-To: allbery@ncoast.UUCP (Brandon Allbery) Followup-To: comp.unix.questions Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 18 As quoted from <241@acich.UUCP> by steve@acich.UUCP (Steve Westfall): +--------------- | Is there a shell command (or a system call) in System V UNIX that | will return the value of the current run state? I would like to use | such a feature in some administrative shell scripts on our system. +--------------- set -- `who -r` echo $2 In case you're interested, "who -r" prints something like: run-level 2 ... (stuff including time the machine entered the run level) ... -- Brandon S. Allbery, moderator of comp.sources.misc and comp.binaries.ibm.pc {{harvard,mit-eddie}!necntc,well!hoptoad,sun!cwruecmp!hal}!ncoast!allbery ARPA: necntc!ncoast!allbery@harvard.harvard.edu Fido: 157/502 MCI: BALLBERY <>