Posts

Vi - Linux Editor Commands

Common vi Commands Have a look at this list of common vi commands (there are many more, but these will at least allow you to get some basic work done). Then we'll do one more exercise before moving on. Note: As with all of Linux, vi commands are case sensitive. Positioning the Cursor � Move cursor one space right. � Move cursor one space left. � Move cursor up one line. � Move cursor down one line. ctrl-F Move forward one screen. ctrl-B Move backward one screen. $ Move cursor to end of line. ^ Move cursor to beginning of line. :1 Move to first line of file :$ Move to last line of file / Search for a character string. ? Reverse search for a character string. x Delete the character at the cursor position. dd Delete the current line. p Paste data that was cut with x or dd commands. u Undo.

Basic UNIX Commands

Directory :: Show current directory pwd Show content of directory ls -al Changing directory cd <newdir> Creating directory mkdir <dir> Deleting directory if empty rmdir <dir> Deleting directory if full rm -r <dir> Moving directory mv <olddir> <newdir> Copy directory cp -r <olddir> <newdir> Files :: Show file entry ls -al <file> Delete file rm -i <file> Move file mv <file> <path> Copy file cp <file> <newfile> Rename file mv <oldfile> <newfile> Show file content at once cat <file> Show file content page wise more <file> Show file with long lines cat <file> | fold Show first 20 lines of file head -20 <file> Show last 20 lines of file tail -20 <file> Edit file <editorname> <file> Edit file with vi vi <file> Give all file permissions to yourself chmod 700 <file> The above even into subdirectories chmod -R 700 <dir...

How to Use the VBScript RegExp Object

  Hi All, I faced a situation where I had to update the field’s value from another file. I can not use the string replace method because It will replace the all the matches value, While I want to replace the first match with the first value of another file.  Here I am trying to explain First File Contents: This blog refers to QTP. I want to get first line value "="   from another file. Here I am using Rexexp with global property value false Now I want to get Second line value "="   from another file. Global property false will serach only first match If regexp global property true then it search all the matches Now I want to get Third line value "="   from another file. Second File Contents: Rajiv Kumar Nandvani I want output like this: This blog refers to QTP. I want to get first line value " Rajiv "  from another file. Here I am using Rexexp with global property value false Now I wan...

VB Script Data Types

VB Script Data Types What is Data Type? Data type is a categorization of identifying one of various types of data , such as string, integer, double, date or Boolean etc… Implicit & Explicit Data types: Specifying Data types along with variable names is called Explicit declaration of Data types. Declaring Variables Without specifying Data types is called Implicit declaration of variables. VB Script Supports Implicit declaration of variables only, doesn’t support Explicit declaration of Data types. VB Script Data Type: VB script has only data type called Variant, it can hold any type of data, and based on usage of data it considers data sub types. Example: Dim x X is a Variable and it can hold any type of data (String, integer, double, date etc…) X= “G C Reddy” ‘String type X= 100 ‘Integer X= 10.345 ‘Double X=#10/10/2010# ‘Date   How to know Data sub types: Using VarType Function we can get data sub type VarType Function It returns a value indicatin...