Archive for the ‘Scripting’ Category

Simple Python scp wrapper

Inspired by the following article I decided to write a simply python scp wrapper which is based on the ideas taken from the perl script also mentioned on the same page. The whole point of this wrapper is dead simple: to allow certain users scp into their specific directories with out granting full ssh access. […]

Posted on May 28, 2013 at 11:34 am by sergeyt · Permalink · Leave a comment
In: Linux, Scripting

How to create many ifcfg-ethN files in one shot

I had a quick task to create 254 ifcfg-eth1:N configuration files for a Linux installation and certainly spending the whole day doing that manually wasn’t part of my plan. Here is a quick and dirty one-liner I used for that:

Posted on October 27, 2010 at 9:39 am by sergeyt · Permalink · Leave a comment
In: Linux, Scripting

No way I want to make the same mistakes again

To avoid stepping on the same rake again and to fix the issue described in this post, I came out with a simple expect script to save current configuration of Qlogic Sanbox switches. #!/usr/local/bin/expect -f set switches “switch1 switch2” set user {user} set pass {pass} set ftp_user {ftp_user} set ftp_pass {ftp_pass} set timeout 10 log_user […]

Posted on May 27, 2009 at 6:44 pm by sergeyt · Permalink · One Comment
In: Scripting

Sed-fu

We all know how incredible and flexible sed really is and recently I had another chance to experience its coolness in the field when one of our Qlogic Sanbox switch lost zone configuration completely. So obvious solution in such cases is just to restore from the backups but since it wasn’t possible, it’s a shame […]

Posted on May 26, 2009 at 12:22 pm by sergeyt · Permalink · Leave a comment
In: Scripting