These are some simple bash functions and scripts for making CSV/TSV files prettier on the command line
see http://stefaanlippens.net/pretty-csv.html for more information.
<?php | |
declare(ticks = 1); | |
class TimeoutException extends Exception {}; | |
function signal_handler($signal) { | |
throw new TimeoutException(); | |
} |
private function getAsnFromIP($ip) | |
{ | |
$query = 'whois -h whois.cymru.com " -f ' . (string) $ip . '"'; | |
$whoisResult = shell_exec($query); | |
$asnArray = explode('|', $whoisResult); | |
$cleanAsn = array_map('trim', $asnArray); | |
return $cleanAsn; | |
} |
These are some simple bash functions and scripts for making CSV/TSV files prettier on the command line
see http://stefaanlippens.net/pretty-csv.html for more information.
#!/usr/bin/env bash | |
# netplan2NM.sh | |
# Ubuntu server 20.04 Change from netplan to NetworkManager for all interfaces | |
echo 'Changing netplan to NetowrkManager on all interfaces' | |
# backup existing yaml file | |
cd /etc/netplan | |
cp 01-netcfg.yaml 01-netcfg.yaml.BAK |