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. […]
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:
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 […]
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 […]