Linux: Count the occurrance of unique words in a file list
April 8, 2019
cat list.txt | xargs -n1 | sort | uniq -c
cat list.txt | xargs -n1 | sort | uniq -c
Word count grep -o ‘word’ filename | wc -l One liner to find a running process and kill it kill $(ps aux |grep -i ‘[/]usr/bin/puppet’ | awk ‘{print $2}’) Find duplicate words in a file grep -wo ‘[[:alnum:][:punct:]]+’ filename.txt | sort | uniq -cd You may need to vary the “bracket expressions”, to fit the
This happened specifically with Fedora 28, but may apply to other versions. Summary: Open a shell in initrd, mount /sysroot as read-write and edit /sysroot/etc/group Steps: 1. Reboot 2. In grub press “e” to edit the menu entry 3. Search for a line that starts either with linux16 or linuxefi and append the string ”
The following example creates to Bonds. Bond0 is Active-Backup Bond1 uses VLAN tagging and LACP Kernel setup: modprobe kernel configuration /etc/modprobe.d/bonding1.conf alias netdev-bond1 bonding options bond1 miimon=100 mode=4 lacp_rate=1 Bond0: ifcfg-bond0 DEVICE=bond0 IPADDR=172.16.0.3 NETMASK=255.255.255.0 NETWORK=172.16.0.0 BROADCAST=172.16.0.255 ONBOOT=yes BOOTPROTO=none TYPE=Bond BONDING_MASTER=yes PREFIX=24 DEFROUTE=yes NAME=”Bond bond0″ BONDING_OPTS=”mode=active-backup miimon=0 arp_ip_target=172.16.0.1 arp_interval=1000″ LAST_CONNECT=1530826407 NM_CONTROLLED=no ifcfg-bond0_slave_1 DEVICE=em1 TYPE=Ethernet NAME=”System em1″
Pull Driver Version: # modinfo qla2xxx | grep version version: 9.00.00.00.40.0-k1 srcversion: 67989F13670BACC60C8CA47 vermagic: 4.1.12-124.17.1.el6uek.x86_64 SMP mod_unload modversions Pull WWPN: # more /sys/class/fc_host/host?/port_name :::::::::::::: /sys/class/fc_host/host1/port_name :::::::::::::: 0x2001000e1e024d24 :::::::::::::: /sys/class/fc_host/host2/port_name :::::::::::::: 0x2001000e1e024d7d