Wednesday, November 21, 2012

Jump back and forth in Code::Blocks

Hi all,

This is how it is done.

  1. First, you need the BrowseTracker plugin.
    • The BrowseTracker-plugin is part of the contrib-plugins. You can install it using the synaptic package manager (codeblocks-contrib)
  2. Once you have the BrowseTracker plugin you would see "Jump" tab in the "View" menu.
    • now you can use this "Jump" for navigating back and forth.
  3. However, to make things a little bit easier you can use the Keyboard shortcuts plugin to assign shortcuts.
    • Go to "Settings->Editor" in the menu bar.
    • Choose "Keyboard shortcuts"
    • In the Commands: option go to Menu bar->View->Jump and add your keyboard shorcuts
That's it!

Cheers!!!

Monday, November 19, 2012

head and tail for shell scripting

Hey guys,

Do you know the head and tail commands?
For example,

head -10 abc.txt > abc_left.txt
tail -10 abc_txt > abc_right.txt

  • The first command will read the first 10 lines from abc.txt and write them into a abc_left.txt file
  • The second command will read the last 10 lines from abc.txt and write them into a abc_right.txt file

Cool isnt' it?

Cheers!