Advanced Sed Substitution Examples

2010-04-11 1 min read Bash Linux

This article is part of the on-going Unix Sed Tips and Tricks series. In our previous sed articles we learned — sed printing, sed deletion, sed substitute , sed file write, and sed multiple commands. In this article, let us review some interesting workarounds with the “s” substitute command in sed with several practical examples. I. […]

Read More: <a href="http://www.thegeekstuff.com/2009/10/unix-sed-tutorial-advanced-sed-substitution-examples/">Unix Sed Tutorial: Advanced Sed Substitution Examples

URL: <a href="http://feedproxy.google.com/~r/TheGeekStuff/~3/uN-cE6UOvfA/">http://feedproxy.google.com/~r/TheGeekStuff/~3/uN-cE6UOvfA/<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://www.slumpedoverkeyboarddead.com/2009/08/06/vim-video-tutorial/">VIM video tutorial (slumpedoverkeyboarddead.com) <li class="zemanta-article-ul-li"><a href="http://www.slumpedoverkeyboarddead.com/2009/08/22/turn-vim-or-emacs-into-and-ide-with-exuberant-ctags/">Turn Vim or Emacs Into and IDE With Exuberant-Ctags (slumpedoverkeyboarddead.com) <div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/0d68ebaf-6fc5-419a-a31c-7d31bc55ab3f/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_e8.png" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related pretty-attribution">

Continue reading

PuTTY export client display on login for opening X application and terminal.

2010-04-11 1 min read Bash Linux

export DISPLAY=$(echo $SSH_CLIENT |awk '{print $1&#8221;:0.0&#8221;}&#8217;)

Explanation:

SSH_CLIENT contains the IP and the port of the client machine. So we need to export (Client IP):0.0 for the display on the client machine. If the above is put in .bashrc or .bash_profile or .profile, then the DISPLAY variable will be set based on the client machine.

Linux Links — collection of universe.. all links on everything about linux

2010-04-11 1 min read Fedora Firefox Linux

<a href="http://loll.sourceforge.net/linux/links/">LoLL is a sourceforge project which maintains a well commented and categorized list of links on linux. This is a very nice list and has very nice links. Probably there is nothing that you will not find here which do not interest you. Definately worth a look.

log analysis with perl and wireshark decode.

2010-04-11 1 min read Linux

Here is something that I had to do in couple of hours to check the logs. The problem was the log file was printing the Received and Sent message in the hex format. I had to verify if the messages were correct. So here is how to do it.

open(FP, &#8221;<$ARGV[0]&#8221;)|| die &#8221;File $ARGV[0] does not exist&#8221;;
while ($line = )
{

if ($line =~ /(Received :)|(Sending :)/)

{

@words = split(/\|/, $words[4]);
$received = $words[1];

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. Here&#8217;s some of my findings:

Continue reading

Prachi – My daughter

2010-04-11 0 min read Linux
\"\"

<span style="font-size: 0.9em; margin-top: 0px;">
<a href="http://www.flickr.com/photos/raj77_in/3936851663/">640×480-dscn0137

Originally uploaded by <a href="http://www.flickr.com/people/raj77_in/">raj77_in

Just felt like posting her photo..
<br clear="all" />

bash script to change vim colorscheme based on the available themes

2010-04-11 0 min read Fedora Vim Tips
\"MacVim
Image via Wikipedia

Here&#8217;s one script that you may find useful. A little variation or wrapper for this script can make your life colorful 🙂

You can write a wrapper to this to take one of the inputs randomly and then use it in alias to start <a class="zem_slink freebase/en/vim" title="Vim (text editor)" rel="homepage" href="http://www.vim.org/">vim.

Continue reading
Older posts Newer posts