mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
Added nb-users and uptime scripts.
This commit is contained in:
parent
17f530c2a2
commit
5f1598f6ae
2 changed files with 46 additions and 0 deletions
23
bin/nb-users
Executable file
23
bin/nb-users
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh -e
|
||||
#
|
||||
# nb_users: print the number of users on the machine
|
||||
# Copyright (C) 2009 Raphaël Pinson.
|
||||
#
|
||||
# Authors: Raphaël Pinson <raphink@ubuntu.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
uptime | sed -e "s/.*, *\(.* user[s]*\), .*/\1/"
|
||||
|
23
bin/uptime
Executable file
23
bin/uptime
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh -e
|
||||
#
|
||||
# uptime: condensed uptime of the machine
|
||||
# Copyright (C) 2009 Raphaël Pinson.
|
||||
#
|
||||
# Authors: Raphaël Pinson <raphink@ubuntu.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
uptime | sed -e "s/.* up *\(.*\), *.* user[s]*, .*/\1/; s/ day[s]*, */d/"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue