Tag Cloud
Currently Reading
Latest Book Reviews
- Certified Kubernetes Application Developer (CKAD) Study Guide, 2nd Edition Posted on January 11, 2025
- Rancher Deep Dive Posted on March 31, 2023
- Leveraging Kustomize for Kubernetes Manifests Posted on March 24, 2023
- Automating Workflows with GitHub Actions Posted on October 13, 2022
- Deep-Dive Terraform on Azure Posted on August 30, 2022 All Book Reviews
Latest Posts
- Removing blank lines in a text file Posted on December 17, 2011
- Vim - Removing the last character of each line in a file Posted on December 16, 2011
- Identifying your version of GNU/Linux Posted on December 9, 2011
- Monitor your public IP Posted on December 2, 2011
- Installing wget on FreeBSD Posted on December 1, 2011
December 17, 2011
Removing blank lines in a text file
by Alpha01
sed '/^$/d' example_file
bash
]
December 16, 2011
Vim - Removing the last character of each line in a file
by Alpha01
In command mode:
:%s/.$//g
vim
]
December 9, 2011
Identifying your version of GNU/Linux
by Alpha01
tony@debian01:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 6.0.3 (squeeze)
Release: 6.0.3
Codename: squeeze
centos
ubuntu
]
December 2, 2011
Monitor your public IP
by Alpha01
My simple yet effective home public IP monitoring script.
#!/bin/bash
current_ip="YOURIPHERE"
ip=`curl -s ifconfig.me`
if [ "$current_ip" != "$ip" ] && [ $ip != "" ]
then
echo "New IP detected: $ip" | mail -s "Public IP has been changed" [email protected]
fi
bash
]
December 1, 2011
Installing wget on FreeBSD
by Alpha01
[root@freebsd01 ~]# cd /usr/ports/ftp/wget
[root@freebsd01 ~]# make install clean
freebsd
]