LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 10-15-2009, 11:13 PM   #1
pjdlmack
LQ Newbie
 
Registered: Oct 2009
Posts: 1

Rep: Reputation: 0
Question regarding start-up shell scripts


I am brand new to Linux, I am trying to write a start-up shell script and I was wondering if you can add a command that will open the vi editor? OK - I have since figured out what I was trying to do and it was export EDITOR=vi, however, I now have another question - how do I save a file so its executable?

Last edited by pjdlmack; 10-16-2009 at 05:58 PM.
 
Old 10-15-2009, 11:23 PM   #2
celthunder
Member
 
Registered: Feb 2009
Location: Newton, WI
Distribution: Arch
Posts: 84

Rep: Reputation: 8
Depends on your distrobution (i'm assuming it's possible in all but theres different methods for each). You could also add it to .bashrc not sure if that'd work but it should.
 
Old 10-15-2009, 11:45 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I'd like some clarification here. vi (or vim as its usually symlinked to) is an interactive editor, so are you asking how to use it:

vi filename

or are you trying to get a startup script to open the editor, in which case this is probably the wrong tool, unless you want to present the user with an open editor when they login; unusual to say the least...

More detail please.
 
Old 10-16-2009, 12:23 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Does "start-up" mean boot, login or desktop session initialisation?
 
  


Reply



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
How to ssh from a shell script ? For ppl who can write shell scripts. thefountainhead100 Programming 14 10-22-2008 06:24 AM
need shell scripts ARsenthil Linux - General 3 05-20-2007 12:55 PM
Shell scripts consty Programming 2 02-18-2007 09:41 PM
Shell scripts...then some. Freestone Programming 3 04-23-2006 12:13 PM
Editing Start up scripts question Neruocomp Red Hat 1 09-09-2005 01:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:27 PM.

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
Open Source Consulting | Domain Registration