≡ Menu

Python Tutorials and HowTos

Python programming related tutorial, howtos, tips, and hacks under Unix like operating systems with special focus on sys admin tasks ( rss feed ).

I'd like to skip first two or three fields at the the beginning of a line and print the rest of line. Consider the following input:

This is a test
Giving back more than we take

I want my input file with the following output:

a test
more than we take

How do I printing lines from the nth field using awk under UNIX or Linux operating systems?
[click to continue…]

How do I run "foo" command 10 times (or n times) under Linux or UNIX like operating systems?
[click to continue…]

vi / vim: Jump To End Of File Command

I'm using vim as a text editor and editing a large code file written in python. How do I jump to end of file using vim text editor under Apple Mac OS X Unix operating systems?
[click to continue…]

How do I determine whether a variable called spath="/srv/www/cyberciti.biz/https" contains a substring called "cyberciti.biz"?
[click to continue…]

gedit: Add Python / C++ Autocomplete Support

How do I add Autocomplete support to gedit text editor under Linux Gnome desktop operating systems?
[click to continue…]

Varnish Change Web Server Signature Headers

I'm using Varnish cache infront of Apache web server and I'd like change my web server signature from

Apache/2.2.8 (Ubuntu) mod_python/3.3.1 Python/2.5.2 mod_ssl/2.2.8 OpenSSL/0.9.8g


Apache Web server

How do I change headers using Varnish?
[click to continue…]

HowTo: Linux Serial Port Sniffer

How do I sniff and monitor data on a serial port under Linux operating systems?
[click to continue…]