Hi:
perl -e 'print "hello world!\n"'
A simple filter:
perl -ne 'print if /REGEX/'
Filter out blank lines (in place):
#!/usr/bin/awk -f | |
# Coded by: Vladislav Grigoryev <vg[dot]aetera[at]gmail[dot]com> | |
# License: GNU General Public License (GPL) version 3+ | |
# Description: Select wireless channel automatically | |
function get_iwphy() { | |
cmd = "iw phy" | |
while(cmd | getline) { | |
if($0 ~ /^\s*Wiphy\s/) |
Hi:
perl -e 'print "hello world!\n"'
A simple filter:
perl -ne 'print if /REGEX/'
Filter out blank lines (in place):
#!/bin/bash | |
PORT=62419 | |
OUTFILE=/tmp/db2_was.log | |
SLEEP=30 | |
echo " TIMESTAMP | PRT | CONNECTION_STATES" | |
echo "------------------------ ------ ---------------------------------------------------" | |
while true | |
do | |
netstat -ant | grep -v grep |grep $PORT| | |
awk -v port=$PORT -v date=" $(date +"%Y-%m-%d %r")" ' |