eTechtips

Tech Tips and Insights

Category: Uncategorized

  • Best Learning sites(in progress)

    Learnable
    www.learnable.com
    Brought to you by Sitepoint. They have created a site to host their on-line classes and a place for people to create their own as
    well.

    Udemy
    www.udemy.com
    Just checking this one out, I found some interesting courses, but many seem to be placeholders for classes to come later.

    LiveMind
    www.livemind.com
    Just read about this one and have not looked thorugh it very much yet.

    0 Comments
  • Vi: Remove Ctrl-M characters from a document

    I regularly have to move scripts between Windows and Linux systems. The line endings from
    Windows can make running my scripts on Linux fail. I have been on a few systems where the
    dos2unix command was not available, so how do I get rid of the Ctrl-M at the end of the lines?

    Command: vi -b <filename>

    The -b sets vi into binary mode. This displays the extra control characters. In vi, I remove the
    ctrl-Ms.

    In vi, I use the following key sequence in command mode:

     :%s/<ctrl-v><enter>//g 

    The ctrl-v tells vi to take the next character and display it as a ctrl char sequence. And hitting the
    enter key displays the ctrl-M. The :%s///g is a command to replace the characters in the first // and replace
    it with the chars in the second // and the g says to do it to every line.

    0 Comments
  • Windows 7: Create Library

    Windows 7 has introduced the concept of a Libary. This is a folder that can contain other folders and is available in the Windows Explorer. So you may have decided that the 4 defaults folders aren’t enough:

    • Documents
    • Music
    • Pictures
    • Video

    So to create a new library:

    1. Select : Start menu->All Programs->Accessories->Windows Explorer
      or
      Press + e
      and click on the Libraries folder in the left hand column.
    2. Right click in an empty space on the folder view and select New->Library
    3. Then name your Library
    4. Right-click your new library and select properties.
    5. Select Folders to include in your library.

    Each library can contain multiple folders. Now everytime you open the explorer your library will be available to you and you do not have to dig into your file hierarchy to find your most used files.

    Suggested Applications:

    • Work folders
    • Project folder
    0 Comments
  • Bash: Command line parser for Multiple arguments to bash

    I regularly have to write scripts into different environments and when I am wrapping a build system, I typically use a Bash script to do it. I often have to pass a set of arguments to the underlying commands in my scripts as well. I have found that the %* argument is the easiest way to take those arguments.

    The %* takes the arguements and passes them along. The %1, %2, %3…and so on are the individual arguments but unless you have a fixed amount of arguments, then you will need to process a variable amount of arguments.

    while [ $#  -gt 1 ]
    do
      case "$1" in
        -a)
          ANALYZE=1
          ;;
        *)
         echo "Invalid option"
         ;;
       esac
       shift
    done
    
    
    0 Comments
  • Welcome to eTechTips

    Say goodbye to the bouncing ball!

    As this site has been close to 10 years in the making, it is time to say goodbye to the basic flash animation that I started with on the main page.

    So feel free to ask questions or give me suggestions for topics.

    0 Comments
  • Welcome To eTechtips – Day One

    Welcome to day one of the revamped eTechtips informational blog.

    Please feel free to request information about any topics that interest you.

    0 Comments