Review your favorite Linux distribution.
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 10-15-2009, 11:13 PM   #1
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
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
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,396

Rep: Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395
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
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

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


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
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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:57 PM.

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