Sponsored Content
Full Discussion: vi editor
Top Forums UNIX for Advanced & Expert Users vi editor Post 78672 by bakunin on Thursday 21st of July 2005 11:07:52 AM
Old 07-21-2005
quite the same:

: 1,$ s/.*/DROP TABLESPACE & INCLUDING CONTENTS/

Replace "DROP TABLESPACE" with any other text you may want to put at the beginning of the line and "INCLUDING CONTENTS" with any other text you may want to put at the end.

bakunin
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Vi editor ?

Hello everybody, My question is: how to add /tmp/work at the end of line in vi editor. my file looks like: cp file1 cp file2 cp file3 **** I need to add " /tmp/work" at the end of each line. I tried this :%s/$/" /tmp/work" and this :%s/$/\ /tmp/work\/ but it does not work. (2 Replies)
Discussion started by: billy5
2 Replies

2. HP-UX

instead VI editor - which one?

I'd like to find some editor for HP-UX, something like notepad, but not VI editor. Can someone have some ideas which one? thx (6 Replies)
Discussion started by: diamond
6 Replies

3. UNIX Desktop Questions & Answers

best editor

We work on AIX 5L We use vi as text editor (only scripts to create and modifiy). What do you think of emacs ? Where can I find it ? Do you know better text editor for scripts ? Thank you for all answers. (1 Reply)
Discussion started by: annemar
1 Replies

4. HP-UX

vi editor

I am new in hp ux and I want work with vi editor, but in hp ux vi editor the backspaes and del keys doesn't work. how can I enable them. thanks (3 Replies)
Discussion started by: hkoolivand
3 Replies

5. UNIX for Dummies Questions & Answers

Pasting text in VI editor from a different editor

Hi, I knw its a silly question, but am a newbie to 'vi' editor. I'm forced to use this, hence kindly help me with this question. How can i paste a chunk 'copied from' a different editor(gedit) in 'vi editor'? As i see, p & P options does work only within 'vi'. (10 Replies)
Discussion started by: harishmitty
10 Replies

6. Shell Programming and Scripting

set EDITOR=vi -> default editor not setting for cron tab

Hi All, I am running a script , working very fine on cmd prompt. The problem is that when I open do crontab -e even after setting editor to vi by set EDITOR=vi it does not open a vi editor , rather it do as below..... ///////////////////////////////////////////////////// $ set... (6 Replies)
Discussion started by: aarora_98
6 Replies

7. Solaris

Epic Editor was not able to obtain a license for your use. Feature Epic Editor :Licen

Epic Editor was not able to obtain a license for your use. Feature Epic Editor :License server is down (1 Reply)
Discussion started by: durgaprasadr13
1 Replies

8. Shell Programming and Scripting

About vi editor

How can ` character be printed on vi editor ? empl_id=`echo $line | awk ' { print $1; } '` (2 Replies)
Discussion started by: senem
2 Replies

9. Shell Programming and Scripting

Not able to use @ in VI editor

Hello All, Need one Help for one issue. I am using a French Keyboard, so @ sign is on key 0 and i have to use right Alt + 0 to print it. It is working everywhere but not inside Vi editor. I can type @ in shell, in notepad. But inside Vi editor it is not working, another problem is that if... (2 Replies)
Discussion started by: yadavricky
2 Replies

10. Open Source

What editor does everyone use?

I was looking through the topics and I wasn't sure if this was the best place to post this question: I was wondering, out of curiosity, which software everyone was using to code their scripts in. I do mostly sh/ksh and my favorite has always been EditPlus because it is small, fast, yet powerful.... (409 Replies)
Discussion started by: yongho
409 Replies
Mined  is a simple screen editor.  At any instant, a window of 24
lines is visible on the screen.  The current position in the file
is shown by the cursor.  Ordinary characters typed in are insert-
ed at the cursor.  Control characters and  keys  on  the  numeric
keypad	(at the right-hand side of the keyboard) are used to move
the cursor and perform other functions.  Commands exist  to  move
forward  and backward a word, and delete words either in front of
the cursor or behind it.  A word in this context is a sequence of
characters  delimited  on  both  ends by white space (space, tab,
line feed, start of file, or end  of  file).   The  commands  for
deleting  characters and words also work on line feeds, making it
possible to join two consecutive lines by deleting the line  feed
between  them.	 The  editor  maintains one save buffer (not dis-
played).  Commands are present to move text from the file to  the
buffer, from the buffer to the file, and to write the buffer onto
a new file.  If the edited text cannot be written out  due  to	a
full disk, it may still be possible to copy the whole text to the
save buffer and then write it to a different file on a	different
disk with CTRL-Q.  It may also be possible to escape from the ed-
itor with CTRL-S and remove some files.   Some	of  the  commands
prompt	for  arguments	(file names, search patterns, etc.).  All
commands that might result in  loss  of  the  file  being  edited
prompt to ask for confirmation.  A key (command or ordinary char-
acter) can be repeated times by typing where is the  escape  key.
Forward  and  backward searching requires a regular expression as
the search pattern.  Regular expressions follow the same rules as
in  the  editor,  These  rules	can be stated as: Any displayable
character matches itself.  . (period) matches any  character  ex-
cept line feed.  ^ (circumflex) matches the start of the line.	$
(dollar sign) matches the end of the line.  c matches the  char-
acter  c  (including  period, circumflex, etc).  [string] matches
any of the characters in the string.  [^string]  matches  any  of
the  characters  except  those	in the string.	[x-y] matches any
characters between x and y (e.g., [a-z]).  Pattern*  matches  any
number	of  occurrences of pattern.  Some examples of regular ex-
pressions are:
  The boy   matches the string The boy
  ^$	    matches any empty line.
  ^.$	    matches any line containing exactly 1 character
  ^A.*.$   matches any line starting with an A,  ending  with	a
	    period.
  ^[A-Z]*$  matches  any line containing only capital letters (or
	    empty).
  [A-Z0-9]  matches any line containing either a  capital  letter
	    or a digit.
  .*X$	    matches any line ending in X
  A.*B	    matches any line containing an A and then a B

Control characters cannot be entered into a file simply by typing
them because all of them are editor commands.  To enter a control
character,  depress  the ALT key, and then while holding it down,
hit the ESC key.  Release both ALT and ESC and type  the  control
character.   Control  characters  are displayed in reverse video.
The commands are as follows.

CURSOR MOTION
arrows Move the cursor in the indicated direction CTRL-A Move cursor to start of current line CTRL-Z Move cursor to end of current line CTRL-^ Move cursor to top of screen CTRL-_ Move cursor to end of screen CTRL-F Move cursor forward to start of next word CTRL-B Move cursor backward to start of previous word SCREEN MOTION
Home key Move to first character of the file End key Move to last character of the file PgUp key Scroll window up 23 lines (closer to start of the file) PgDn key Scroll window down 23 lines (closer to end of the file) CTRL-U Scroll window up 1 line CTRL-D Scroll window down 1 line MODIFYING TEXT
Del key Delete the character under the cursor Backspace Delete the character to left of the cursor CTRL-N Delete the next word CTRL-P Delete the previous word CTRL-T Delete tail of line (all characters from cursor to end of line) CTRL-O Open up the line (insert line feed and back up) CTRL-G Get and insert a file at the cursor position BUFFER OPERATIONS
CTRL-@ Set mark at current position for use with CTRL-C and CTRL-K CTRL-C Copy the text between the mark and the cursor into the buffer CTRL-K Delete text between mark and cursor; also copy it to the buffer CTRL-Y Yank contents of the buffer out and insert it at the cursor CTRL-Q Write the contents of the buffer onto a file MISCELLANEOUS
numeric + Search forward (prompts for regular expression) numeric - Search backward (prompts for regular expression) numeric 5 Display the file status CTRL-] Go to specific line CTRL-R Global replace pattern with string (from cursor to end) CTRL-L Line replace pattern with string CTRL-W Write the edited file back to the disk CTRL-X Exit the editor CTRL-S Fork off a shell (use CTRL-D to get back to the edi- tor) CTRL- Abort whatever the editor was doing and wait for com- mand CTRL-E Erase screen and redraw it CTRL-V Visit (edit) a new file Mined was designed by Andy Tanenbaum and written by Michiel Huis- jes.
All times are GMT -4. The time now is 03:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy