vi Notes
----------------------------------------------------------------------
Modes:
vi
command
edit (ESC to goto command mode)
ex - line editor
: prompt
:vi (to goto visual mode)
----------------------------------------------------------------------
vi Commands:
a - append after cursor
A - append after end of line
c - change needs scope (ex: 3cw would change the next 3 small words)
cc - change line
C - change from cursor to end of line
d - delete scope (ex. 5dW would delete next 5 big words)
dd - deletes line
D - deletes to end of line
i - insert after cursor
I - insert at begining of line (not counting whitespace)
o - opens new line after cursor
O - opens new line before cursor
p - "put" or paste after cursor from cut & paste buffer
"3p - paste from 3 edit
P - pastes before cursor
r - replace current char
R - replace till ESC pressed
s - substitute till ESC pressed
u - undo
U - undo all changes on this line
x - delete 1 char
yy - "yank yank" or copy current line into cut & paste buffer
ZZ - save and quit
. - repeat last change
>> - indent 1 shiftwidth
<< - outdent 1 shiftwidth
^V - in edit mode will insert control codes
/regexpression - finds regular expression
?regexpression - finds regular expression towards top of file
----------------------------------------------------------------------
Regular expressions: (wild cards)
^ - begining of a line not counting whitespace
0 - goto first char on line
$ - end of a line
\ - gets rid of magic
\$ - matches a dollar sign
. - matches any char
[4-7] - matches numbers 4 thru 7
[A-Z] - matches A thru Z
[j-r] - matches j thru r
* - zero or more of preceding expression
^[A-Z][0-9][0-9]* - would match a cap letter 1 number at begining of line
----------------------------------------------------------------------
----------------------------------------------------------------------
vi Movement:
^ - begining of line
$ - end of line
b - back 1 small word
B - back 1 big word
e - end of small word
E - end of big word
G - goto end of file
2G - goes to line 2
h - moves to left
j - moves down 1 line
l - moves 1 char to right
k - moves up 1 line
w - move 1 small word
W - move 1 big word
----------------------------------------------------------------------
vi Scope:
w,W,b,B, etc
----------------------------------------------------------------------
vi Notes:
most commands can be preceeded by a number for multiple occurances
(example 3dd - would delete the next 3 lines)
small word is defined by whitespace
whitespace is tabs, spaces.
big word is defined by any puncuation (){}[],.!?\|:;'"<>-_@#$%^&*
----------------------------------------------------------------------
----------------------------------------------------------------------
ex commands:
g - global finds regular expressions
map - map control codes or function keys to macros
q - quit
r - reads in file
s - substitute
so - execute macro file
set - set options
w - write
----------------------------------------------------------------------
ex Examples:
:7 - goes to line 7
:4,6d - deletes lines 4 thru 6
:r file - reads file into current doc after current line
:r !command - reads results of UNIX command into doc
:r !date - would read in date command
:4,9!command - pipes lines 4 thru 9 to UNIX command
:%!sort - would sort all lines
:3,8!sort - would sort lines 3 thru 8
:%g/^print/d - would delete all lines that start with print
:%s/ouput/output/g - would change ouput to output on all lines
:set nows - nowrapscan set searches not wrap around to begining of file
:set ic - ignore case on searches
:set nonu - no line numbers
:set all - to see all the options
:map #1 1G - map function key 1 to goto line 1
:map #2 G - map function key 2 to goto last line
:map #3 :set ts=40^M - map f3 to set tabstops to 40 chars
:map #4 :set sw=3^M - map f4 to set shiftwidth to 3 chars
:map #5 :set ai^M - map f5 to autoindent
:map #6 :%s/^I/ /g^M - map f6 to change control-i to 3 spaces
:map ^O :%s/display/print/g^M - map ^O to change display to print
----------------------------------------------------------------------
Saving and Quiting:
:q! - force a quit even on a modified file
:wq - write and quit
:wq! - force a write then quit (can not do if permissions wrong)
:w newfilename
:q - quit
----------------------------------------------------------------------
ex Scope:
. - current line
$ - last line
5,7 - lines 5 thru 7
1,$ - all lines
% - all lines
.,$ - current line to end of file
----------------------------------------------------------------------
ex Notes:
most commands require scope
scope are the lines to issue command on
----------------------------------------------------------------------
Translate to your Language
Labels
- BI
- Big Data
- BO
- BO Universe Context
- BusinessObjects Context
- BusinessObjects Universe Context
- Cognos
- Command Line DataStage Job Export
- DataStage
- DataStage Command Line Compile
- DataStage Job Compile in command line
- DataStage SCD
- DataStage Server JobCompile Script
- DB
- DW
- DW-SCD
- Optimizing BO Universe and Reports
- Optimizing Business Objects Universe and Reports
- Other
- Q&A
- SAP BO
- SCD
Disclaimer Statement
Total Pageviews
Category
- BI
- Big Data
- BO
- BO Universe Context
- BusinessObjects Context
- BusinessObjects Universe Context
- Cognos
- Command Line DataStage Job Export
- DataStage
- DataStage Command Line Compile
- DataStage Job Compile in command line
- DataStage SCD
- DataStage Server JobCompile Script
- DB
- DW
- DW-SCD
- Optimizing BO Universe and Reports
- Optimizing Business Objects Universe and Reports
- Other
- Q&A
- SAP BO
- SCD
Track
Follow us on FaceBook
About
Powered by Blogger.
Category
- BI
- Big Data
- BO
- BO Universe Context
- BusinessObjects Context
- BusinessObjects Universe Context
- Cognos
- Command Line DataStage Job Export
- DataStage
- DataStage Command Line Compile
- DataStage Job Compile in command line
- DataStage SCD
- DataStage Server JobCompile Script
- DB
- DW
- DW-SCD
- Optimizing BO Universe and Reports
- Optimizing Business Objects Universe and Reports
- Other
- Q&A
- SAP BO
- SCD
Contributors
Blog Archive
-
▼
2012
-
▼
December
- Datastage Universe Quick Refrence
- Conformed Dimensions with example
- BusinessObjects - list of values (LOV)
- What is ETL Mapping Document ?A Real Time Example
- Types Database Schemas
- Types Database Schemas
- Data Warehousing Objects
- Data Warehousing Objects
- Unix Vi Quick Reference
- Unix Vi Quick Reference
- PERL Quick References
- PERL Quick References
- Basic korn shell notes
- Basic korn shell notes
- Normalization...
- Normalization..
- What is Factless Fact Table?
- What is Factless Fact Table ?
- Fact Table Loading Types
- Fact Table Loading Types
- Data Warehouse "Datastage " Staging Area
- Data Warehouse Loading Techniques
- Data Warehouse Loading Techniques
- Why do we need a Data Warehouse Staging Area?
- Why do we need a Data Warehouse Staging Area?
- Datastage Error and reject record Handling simplified
- Datastage Error and reject record Handling simplified
- Traditional BI VS In-Memory QlikView
- Traditional BI VS In-Memory QlikView
- Adding a key field to an existing “Hash” file (con...
- Adding a key field to an existing “Hash” file (con...
- Use of Default or Dummy row in dimension table
- Use of Default or Dummy row in dimension table
- Data Profiling and its importance
- Data Profiling and its importance
- Materialized View
- Materialized View
- Slowly Changing Dimensions
- creating a unique counter in DataStage jobs
- Performance Analysis of Various stages in DataStag
- Performance Analysis of Various stages in DataStag
- creating a unique counter in DataStage job
- creating a unique counter in DataStage job
-
▼
December
Popular Posts
-
Netezza dosen't have any isnumeric check function, so in order to find out whether the column has non-numeric, use the following logic n...
-
If you have table like below GROUP_NAME GROUP_ID PASS_FAIL COUNT GROUP1 5 FAIL 382 GROUP...
-
@echo off :: ----------------------------------------------------------------- :: DataStageExport.bat :: -----------------------------------...
-
Netezza has 3 internal planner Fact Relationship Planner (factrel_planner) Snowflake Planner Star Planner In the course of a query pla...
-
What is Big Data? Big data is data that exceeds the processing capacity of traditional database systems. The data is too big, moves too fast...
-
Source :-dwh-ejtl.blogspot.com Q1) Tell me what exactly, what was your role? A1) I worked as ETL Developer. I was also involved in requireme...
-
One of the regular viewer of this blog requested me to explain the important's of the ETL mapping document. What is ETL Mapping Document...
-
I am sure most of you heard about market buzz words nosql,newsql... and it often make our DW developers to get confused on this new terms.Mo...
-
In data warehousing, a conformed dimension is a dimension that has the same meaning to every fact table in the structure. Conformed dim...
-
This note assumes some familiarity with the DataStage transformation engine. DataStage is normally used to process multiple input files and/...
Wednesday, December 26, 2012
Unix Vi Quick Reference
by Unknown | 
in Other
at 8:16 PM
-
Netezza ISNUMERIC Data Check Logic
-
How to do PIVOT in netezza SQL
-
Datastage DSX Files Export Script
-
Netezza Optimizer Parameters
-
Big Data and Hadoop Questions and Answers
-
Informatica Job Interview Question & Answers
-
What is ETL Mapping Document ?A Real Time Example
-
NOSQL 101
-
Conformed Dimensions with example
-
Data Generation Using DataStage
0 comments: