answersLogoWhite

0


Best Answer

Run 'vi /path/to/file/name', where 'name' is whatever you want the script to be called. Then edit the file like you would any other. Once you're done writing the script, close vi (don't forget to save the file on your way out! entering ':wq' does this). In order to be able to run your script, run 'chmod +x /path/to/file/name'.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How you can create a script file using VI editor?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you create m files in matlab?

To create m files in MATLAB, you can either click on the "New Script" button in the MATLAB editor toolbar or go to the "File" menu and select "New" and then "Script." This will open a new script file where you can write and save your MATLAB code. Make sure to give your new m file a descriptive name and save it with the .m extension.


How do you create a PHP script?

To create a PHP script all you have to do is create a new file, then save the file as "filename.php". It must have a .php file extension.After that open the file and put in the PHP tags like shown.Then you write your PHP script within those tags and upload to your web space and check it out.


How do you write shell scripting in UNIX?

A shell script is nothing more than a readable and executable ASCII text file. In this file you put all of the commands that you want to execute, in sequence. The name of the file can be anything you like. Any text editor (VI, VIM, pico, etc) can create a shell script file In addition, shell script files have the ability to detect logic, and are programmable. Just think about what tasks you want to perform and their order, and put it into a file, and there you have a shell script.


How can you create a header file in c?

Use a text-editor.


How do you open a new file in unix?

Your question isn't really that clear; you can create a new file when exiting any of the editor programs, by using I/O redirection, or the touch command.


How do you create a file and write some data in it?

Use a text editor.


What program used to create text file or make change to existing file is?

An Editor or a Wordprocessor Which specific program depends on how complex the tasks are that you want to perform and what type of computer you are using.


What is the bat file extension called?

.bat indicates a batch file, which is a script. You can see what it contains by opening it with a text editor, such as notepad.


How can you make zero byte files in unix without using vi editor?

Use the 'touch' command. You cannot create a zero byte file with 'vi'.


What utility is used to create and edited XF86Config file?

Any text editor can be used to edit the configuration file.


When using the ed editor what characters denotes the last line in a file?

It is $


In Windows XP How do you create a text file?

To createa text file in Windows XP or any version of XP, open any word processor or text editor and create your file. Once you create your file, save it with the .TXT contention to save it as a text file.