LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-14-2008, 01:16 PM   #1
compman9
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, 01:21 PM   #2
Tinkster
Moderator
 
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
Hi,

Welcome to LQ!

:w filename


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

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

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

Quote:
:w filename.sh
 
Old 04-14-2008, 01:25 PM   #4
compman9
LQ Newbie
 
Registered: Apr 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Talking

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

Rep: Reputation: 15
http://www.yolinux.com/TUTORIALS/Lin...vanced_vi.html

It is a very good handy Vi guide.

Gentoo

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

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


Reply


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 10:36 AM
VPN: Debian Scripts -> Mandriva 2006 Scripts Undefined Mandriva 0 11-30-2005 12:10 PM
IPTables: config files, scripts, saving etc...confused tarballed Linux - Security 4 12-30-2004 06:41 PM
Need help running scripts from scripts sdouble Linux - Newbie 3 05-31-2004 12:56 PM
saving and not saving sessions on desktop ergo_sum Linux - Newbie 2 09-26-2003 07:27 AM


All times are GMT -5. The time now is 12:41 AM.

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