Simple function to (properly) compare version strings in bash
You can not do alphabetic comparison:
# List all [sections] of a .INI file | |
sed -n 's/^[ \t]*\[\(.*\)\].*/\1/p' | |
# Read KEY from [SECTION] | |
sed -n '/^[ \t]*\[SECTION\]/,/\[/s/^[ \t]*KEY[ \t]*=[ \t]*//p' | |
# Read all values from SECTION in a clean KEY=VALUE form |
{ | |
"basics": { | |
"name": "Toni Homedes", | |
"label": "Embedded Programmer and DevOps", | |
"picture": "https://ca.gravatar.com/avatar/ba5f96391f5499c01e98d03957e31f98", | |
"email": "toni@homedes.net", | |
"phone": "+34 647-10-77-35", | |
"website": "https://toni.homedes.net/", | |
"location": { | |
"postalCode": "08330", |
Googling for "What is safe to exclude for a full system backup?" Found [this answer](http://askubuntu.com/questions/28477/what-is-safe-to-exclude-for-a-full-system-backup/28488#28488 What is safe to exclude for a full system backup?) from arrange and tried to build a bit on it
Please leave a comment if you know of more things that can be safely excluded from a full backup
I hereby claim:
To claim this, I am signing this object:
template<typename T, typename Container = std::vector<T> > | |
class SortedVector { | |
public: | |
typedef T value_type, &reference; | |
typedef const T &const_reference; | |
typedef Container container_type; | |
typedef typename container_type::iterator iterator; | |
typedef typename container_type::const_iterator const_iterator; | |
typedef typename container_type::size_type size_type; |
#!/bin/bash | |
# vim: set ts=4 sw=4 noet fileencoding=utf-8: | |
fontDir=`figlet -I2` | |
if [[ $# -eq 0 ]]; then | |
echo "usage: $(basename $0) [message] -- print given message for every available font in figlet" | |
exit 0 | |
fi |
DELIMITER $$ | |
DROP FUNCTION IF EXISTS `cif_letra` $$ | |
CREATE FUNCTION `cif_letra` (`p_cif` INT UNSIGNED) RETURNS CHAR(1) | |
-- ---------------------------------------------------------------------------- | |
-- Calcula la letra que corresponde al núm. de CIF dado | |
-- ---------------------------------------------------------------------------- | |
DETERMINISTIC | |
NO SQL |
# | |
# Get all sections from .INI file | |
# | |
sed -n 's/^[ \t]*\[\(.*\)\].*/\1/p' /etc/samba/smb.conf | |
# | |
# Get all values of given section in a clean key=value form | |
# | |
section=global; sed -n '/^[ \t]*\['"$section"'\]/,/^[ \]t*\[/s/^[ \t]*\([^;#\[][^ \t]*\)[ \t]*=[ \t]*\(.*\)/\1=\2/p' /etc/samba/smb.conf | |
# | |
# Get a specific value for a given key and section |
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation] | |
"RealTimeIsUniversal"=dword:00000001 |