How to remove empty or blank lines with awk.
Example 1:
command | awk '/^s*$/'
Example 2:
awk '/^s*$/' filename
How to remove empty or blank lines with awk.
Example 1:
command | awk '/^s*$/'
Example 2:
awk '/^s*$/' filename
When working across multiple platforms and flavours of IX, a system administrator might not always have tools like telnet or netcat available to test network connections. One tool that is on all flavours of IX and is universal is python.
A quick python script for testing network connection.
I used this python script to send a message via UDP to a logstash server.
Validating password with python.
Regex
import re
passRX = re.compile(r'[A-Za-z0-9@#$%^&+=]{8,}')
pp = passRX.search('dy_5mupV')
pp == None
True
pp = passRX.search('DEVGukvk')
pp == None
False
Example:
This will erase all checkID's with single and/or double digits.
:%s/"checkID":[0-9]\{1,2\} //g
Before
Running command.