Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-14-2008, 02:16 PM   #1
LQ Newbie
Registered: Apr 2008
Posts: 6

Rep: Reputation: 0
Question Saving As... for Scripts

I wrote a script for the first time and as i finished i entered command mode. I then pressed :w to save the file. The screen read on the bottom of the terminal:

E32: No File Name

How do i create a filename for this script???
Old 04-14-2008, 02:21 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910

Welcome to LQ!

:w filename

Old 04-14-2008, 02:22 PM   #3
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
You can give Vi/Vim the file name when you start, even if there is no actual file with that name. Such as:

vi ./filename
Now that you are running, you need to give the :w command with a file name, like so:

Old 04-14-2008, 02:25 PM   #4
LQ Newbie
Registered: Apr 2008
Posts: 6

Original Poster
Rep: Reputation: 0

Thank you very much!
Old 04-14-2008, 02:42 PM   #5
Registered: Mar 2008
Posts: 101

Rep: Reputation: 15

It is a very good handy Vi guide.


Last edited by prad77; 04-17-2008 at 04:49 AM.
Old 04-14-2008, 03:01 PM   #6
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 59
Or at the command line you can create a file with touch, touch then open it with your favorite editor.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Slightly newb - autolaunching, scripts, and saving output Scalpel4 Linux - Newbie 15 02-22-2006 11:36 AM
VPN: Debian Scripts -> Mandriva 2006 Scripts Undefined Mandriva 0 11-30-2005 01:10 PM
IPTables: config files, scripts, saving etc...confused tarballed Linux - Security 4 12-30-2004 07:41 PM
Need help running scripts from scripts sdouble Linux - Newbie 3 05-31-2004 01:56 PM
saving and not saving sessions on desktop ergo_sum Linux - Newbie 2 09-26-2003 08:27 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:13 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration