Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Command to quit from vi editor Post 302643713 by KAREENA18 on Sunday 20th of May 2012 12:30:29 PM
Old 05-20-2012
Question Command to quit from vi editor

Hi Folks
I have opened a log file in Vi editor

Code:
vi abc.log

Please advise me how to finally quit from Vi editor, which command is there..!

Is it
Code:
:q<Enter>


Last edited by KAREENA18; 05-20-2012 at 01:45 PM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

vi editor - ex Command help

:1,10 s/yes/no/g this ex command will substitute yes with no everytime it is found within the first 10 lines of the file. :s/yes/no/g this ex command will substitute yes with no everytime it is found for the line where the cursor is on my question is how could this substitution be... (4 Replies)
Discussion started by: theDirtiest
4 Replies

2. UNIX for Dummies Questions & Answers

editor command

I want to copy lines say from 2-5 to line after 20 in vi editor. Can I achieve this in a single command in vi editor. Thanks. (2 Replies)
Discussion started by: tselvanin
2 Replies

3. UNIX for Dummies Questions & Answers

vim as command line editor

Here is my problem, I manage a SunOs 5.8 Server, vi is the default command line editor, I have a line on each users .kshrc profile as follows: export EDITOR=/bin/vi I want to use vim as the command line editor, the below line doesn't work export EDITOR=/bin/vim Thank you (1 Reply)
Discussion started by: tony3101
1 Replies

4. UNIX for Dummies Questions & Answers

Search command on vi editor

Hi all, Here is an example, I would wan to search for all string consists of IMP but not IMP-00015. Values other than 00015 is fine, is there anyone knows how to do that? Thanks. (2 Replies)
Discussion started by: *Jess*
2 Replies

5. UNIX for Advanced & Expert Users

Problem about SMTP 'QUIT' command

I am runing MTA that I made to receive mail. Sometimes sending MTA send delayed 'QUIT' command. In this case, after I send '250 OK' response for data, I must wait 'QUIT' command even a few minutes. Thanks in advance. Following is the log... (2 Replies)
Discussion started by: hcliff
2 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. Shell Programming and Scripting

Easy ex editor command

I've this command in a script which edits the file ... bash$ cat temp_file.txt THREAD #2 2 Running bash$ (echo "s/THREAD #2/d"; echo 'wq') | ex -s temp_file.txt bash$ cat temp_file.txt THREAD #2 2 Running If i've more than 1 line it easily deletes the line, but if it is the last line... (3 Replies)
Discussion started by: prash184u
3 Replies

8. UNIX for Beginners Questions & Answers

Accessing Isql command via VI editor

Hi Guru's, I'm new at Unix. I am tasked to monitor the filesystem utilization on OS level (Unix) and DB (Sybase) for multiple systems. I am thinking to use vi editor and make a file, execute that file and all the file systems I need to monitor will be be shown. My script inside vi goes in... (8 Replies)
Discussion started by: Xworks
8 Replies

9. Shell Programming and Scripting

Help with regular command creation for editor vi

Hi, I need help. I need to build command for line command editor vi. I want to take the whole string and assemble it in a regular expression. He then folded into another shape. Can anyone help me? (4 Replies)
Discussion started by: Pabloss
4 Replies
whatnow(1)						      General Commands Manual							whatnow(1)

NAME
whatnow - prompting front-end for send (only available within the message handling system, mh) SYNOPSIS
whatnow [options] [file] OPTIONS
Specifies the folder in which whatnow searches for the draft message. By default, the current message in the named folder is used. If you wish to specify another message, use the -draftmessage option. For more information on using a draft folder, see comp(1). The -draftfolder option can be set up in your user profile; see mh_profile(4) for more information. Specifies the draft message to be used. If you specify a folder with the -draftfolder option, the -draftmessage option takes the number of a message in that folder. If you do not specify a folder, -draftmessage takes the name of a file. If you do not give an absolute pathname (one beginning with a / or or ), -draftmessage assumes that the file is located in your Mail directory. (This is different from the file argument to whatnow, which assumes that the file you name is in your current working directory.) Specifies the name of the editor you want to use to edit the draft message. Any legal edi- tor can be specified. This option is used only if you select the edit response to the What now? prompt. Prints a list of the valid options for this command. Prevents the initial invocation of an editor when an MH command is run. Normally, when you enter an MH command such as comp, dist, forw, or repl, the whatnow program is called to start the initial edit of the draft message. If you add this option to the whatnow entry in your is disabled. This is a convenient way of disabling this edit for all MH commands, rather than adding the -noedit entry to the entries for the individual commands in Specifies the prompt used by whatnow. The prompt you receive when you invoke whatnow can be specified as a string with this option. If the prompt contains spaces, you must enclose the entire string in double quotes (" "). The default prompt is What now? DESCRIPTION
After you have finished editing a draft message in comp, dist, forw or repl, the whatnow program prompts you for the next required action. Press <Return> at the What now? prompt to see a list of the available responses. These responses are: display [options] edit [editor] [options] list [options] push [options] quit [-delete] refile [option] +folder send [options] whom [options] For more information on the options available with these commands, see the following reference pages: refile(1), send(1), whom(1). Use display if you have been using repl or dist and want to see the original message. Use edit if you want to continue editing the draft. Use list to display the draft message. If you use push, send operates in the background and frees your terminal while the message is being sent. Use quit to exit from whatnow and to save the draft message. The -delete option to quit will exit from whatnow and delete the draft mes- sage. Use refile +folder to refile the draft message in a specified folder. The send response will cause the message to be delivered. Use whom to find out who will receive the mail when it is sent. Unless the -noedit option is given, the editor starts when whatnow is invoked. For the edit response, you can specify an editor if you wish to override the editor specified in your file. If you specify an editor with the edit response, any valid option to the editor is valid. Similarly, for the send and whom responses, any valid option to send and whom commands, respectively, are valid. For the push response, use any valid option to send. MH invokes send with the -push option. For the refile response, any valid option to the fileproc is valid. The fileproc is the element of your mail profile which defines the pro- gram used to refile messages in another folder. For more information, see mh_profile(4). For the display and list responses, any valid argument to the lproc is valid. If any non-option arguments are present, then the pathname of the draft is excluded from the argument list given to the lproc (this is useful for listing another MH message). The lproc is the element in your mail profile which defines the program used to display draft messages on your screen. For more information, see mh_profile(4). See mh_profile(4) for further information about how editors are used by MH. It also describes lproc and fileproc and shows how complex variables can be used to direct the actions performed by whatnow. Although whatnow is usually invoked by other commands, you can use it as a separate command. You can run whatnow on a named file by speci- fying the file as the file argument. If you do not give an absolute pathname (one beginning with a / or or ), whatnow assumes that the named file is in your current working directory. If you want to run whatnow on an existing message, use the -draftfolder and -draftmessage options. RESTRICTIONS
If the sendproc entry in your is send, whatnow uses a built-in program rather than running the regular send. If you define your own send- proc program, you should not call it send, as whatnow will not run it. PROFILE COMPONENTS
Path: To determine your MH directory Draft-Folder: To find the default draft folder Editor: To override the default editor lasteditor-next: To name an editor to be used after exit from lasteditor fileproc: Program to refile the message lproc: Program to list the contents of a message sendproc: Program to send the message whomproc: Program to determine who a message would go to EXAMPLES
In the following example, whatnow takes the current message in the folder +drafts, and asks what you want to do with it: % whatnow -draft- folder +drafts What now? In the following example, whatnow takes message 6 from the folder +drafts: % whatnow -draftfolder +drafts -draftmessage 6 What now? The following example sets the prompt to be Now What?: % whatnow -prompt "Now What?" Now what? FILES
The user profile. SEE ALSO
comp(1), send(1), whom(1) whatnow(1)
All times are GMT -4. The time now is 10:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy