BigOncleSam icon

SysAdmin Guide

BigOncleSam | PRO | 07/23/18 03:05:13 PM UTC | 0 ⭐ | 248 👁️ | Never ⏰ | []
Bash |

1.02 KB

|

None

|

0 👍

/

0 👎

# Dell tools
omreport
omreport processors
 
# Kill users processes
su - username -c 'kill -9 -1'
 
AWK QUICK COLUMNS
 
Most of the time when you use awk from the command line, 
you're doing something simple like this:
 
ps -ef | grep netscape | awk '{print $2}' 
 
To save typing, use this script when you only want to
use awk to print out one or more columns:
 
------------------- CUT HERE ---------------------------
#!/bin/ksh
# awkc - print out one or more columns
 
p=\$$( echo $1 | sed 's/,/,\$/g' )
shift
eval "awk '{ print $p }'" $*
 
# eof
------------------- CUT HERE ---------------------------
 
Now you can do things like:
ps -ef | awkc 2,1
or
awkc 1,2,3 /var/adm/messages*
 
Retirer ^M
:%s/^V^M//g
 
# Modules Kernel
lsmod
modprobe
 
# bash curl-piped args
curl -sSL https://raw.githubusercontent.com/ronggang/transmission-web-control/master/release/install-tr-control.sh | bash -s auto
 
# grub rescue
echo "init=/bin/sh" >> /boot/cmdline.txt
mount -o remount, rw /
passwd root
sync
exec /sbin/init

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎