bash one liner to change/remove test pattern from config file or text file.

2010-06-25 1 min read bash Fedora Learning Linux
Problem: I had a directory with a lot of config files in the ini file format, i.e. name and value separated by equals. Some/all of these contained some directory names and other values which had to be replaced. But there were other place where I should not not replace them, if there was no exact match. I also needed to have a backup copy of the file that I was modifying. Continue reading

Script to add all the partitions to the fstab.

2010-06-24 5 min read bash Fedora
I wrote a simple script today to get all the partitions on all the disks and then create <a class="zem_slink freebase/en/fstab" title="Fstab" rel="wikipedia" href="http://en.wikipedia.org/wiki/Fstab">fstab entry with them. The script also gets the <a class="zem_slink freebase/en/universally_unique_identifier" title="Universally Unique Identifier" rel="wikipedia" href="http://en.wikipedia.org/wiki/Universally_Unique_Identifier">UUID and uses the same to make the entry 🙂 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Continue reading

bash script to change icon theme to check out all the installed themes (personal)

2010-05-19 2 min read Fedora Gnome Linux
I am really annoyed with the time that is required and the number of clicks that it takes to change the gnome icon theme. So here&#8217;s a small script that I wrote to quickly check out all the icon themes that I have in my ~/.icons folder. #!/bin/bash [[ &#8221;$1&#8221; == &#8221;&#8221; ]] && time=5 || time=$1 [[ &#8221;$2&#8221; == &#8221;&#8221; ]] && ( cd ~/.icons cont=&#8221;y&#8221; echo &#8221;Select one of the icon themes&#8221; Continue reading

bash script to periodically change the cursor theme.

2010-05-07 1 min read Fedora Gnome
#!/bin/bash [[ &#8221;$1&#8221; == &#8221;&#8221; ]] && time=5 || time=$1 [[ &#8221;$2&#8221; == &#8221;&#8221; ]] && ( cd ~/.icons cont=&#8221;y&#8221; echo &#8221;Select one of the icon themes&#8221; echo &#8221;When you like some theme just press Ctrl+c&#8221; for i in * do [[ -d $i/cursors ]] && ( echo &#8221;Now trying …. : $i&#8221; gconftool-2 –type string -s /desktop/gnome/peripherals/mouse/cursor_theme &#8221;$i&#8221; sleep $time ) done ) || gconftool-2 –type string -s /desktop/gnome/peripherals/mouse/cursor_theme &#8221;$2&#8221; Continue reading

Bugzilla Automation with perl — add, update or query any bug in Bugzilla using perl and www series modules for perl.

2010-04-11 3 min read Fedora Linux
Today I was trying to do some queries and see if I could create a new bug or update a existing bug in the Bugzilla. The one that I was trying to access was on version 2.0 and not on 3.0. This being the case, the XMLRPC interface was not working properly and to top it all, I was wanted to query quite a lot of bugs. So, I went out to evaluate how to avoid the manual work and get this done faster. Continue reading

bash – change theme for gtk in gnome and take screenshot from script.

2010-03-24 1 min read bash Fedora Gnome
I wrote a blog on bash script to change the icon/cursor theme using a bash script. Lets extend the same concept a little more and use the script to change the gtk theme for gnome and at the same time take a screenshot also. #!/bin/bash path=&#8221;/tmp/screenshot&#8221; [[ &#8221;$1&#8221; == &#8221;&#8221; ]] && time=5 || time=$1 [[ &#8221;$2&#8221; == &#8221;&#8221; ]] && ( cd ~/.themes cont=&#8221;y&#8221; echo &#8221;Select one of the icon themes&#8221; Continue reading
Newer posts