Sort CLI output by line length

Want to sort file contents by each line’s lenght? No problems: artemn@artemn-laptop:~$ cat /etc/passwd | awk ‘{print length, $0}’ | sort -n | awk ‘{$1=””; print $0 }’

Read more →

 

Faces behind Linux -- Part #1

What/who you imagine when you hear the names “Ubuntu”, “Debian”, “Slackware”, etc?  Is this tux, penguin, disribution logo? Have you ever wondered who is behind certain Linux distribution? Ian Murdock (left) founded Debian while a student in 1993. He named Debian after himself and his then-girlfriend Debra, now his ex-wife, thus Deb(ra) and Ian. From Ian’s blog: Debian was one of the first Linux distributions and arguably the first open […]

Read more →

 

Tiny bash scripts: check Internet connection availability

Sometimes it is necessary to check whether server you want to run some big bash script is connected to Internet. Usually it makes sense while running scripts periodically using cron.  Below is the tiny bash script for this purpose: #!/bin/bash WGET=”/usr/bin/wget” $WGET -q –tries=10 –timeout=5 http://www.google.com -O /tmp/index.google &> /dev/null if [ ! -s /tmp/index.google ];then echo “no” else echo “yes” fi As you see it tries to download google’s […]

Read more →

 

Watching HD Media on Linux made easy

This article is presented to you by LaptopLogic.com. Go there to read the latest info on the top rated laptops and the best laptop accessories. [digg-me]The High Definition (HD) content is everywhere these days, from HD and Blue Ray Discs to streaming HD media. Although HD content gives best picture quality, it also uses a lot of computational power to decode and play. This was made easy for Windows by […]

Read more →