A question about shell programming and the Kate editor (or KWrite). When using Kate (or KWrite) for shell programming I normally do not get sytnax high-lighting. I assume this is because most scripts do not have a file extension. If I add the file extension "sh" then I get syntax high-lighting. Two questions.. - Why are file extensions rarely used on shell scripts? - If I start using a file extension (like "sh") what would be the most appropriate extension for bash scripts? And a third questions... - What is the best editor (your opinion) in the Suse distro (I'm using 8.1) for shell programming? For PHP programming? Thanks! Matt
1.) Shell scripts are usually started by typing and geeks are lousy typists (just look at all the short lower case commands and programs that can be ran at a shell prompt) so why type an extra .sh when you don't need it? Hey thats my theory! 2.) Use what extension you want but Linux will look at the exec bit in the file properties and the first line of the script to see what it needs to do. 3.) I am not going to get drawn into a vi vs. emacs religious war! I have seen too many ;-) On Tuesday 15 July 2003 10:18 am, Matt Stamm wrote:
A question about shell programming and the Kate editor (or KWrite).
When using Kate (or KWrite) for shell programming I normally do not get sytnax high-lighting. I assume this is because most scripts do not have a file extension. If I add the file extension "sh" then I get syntax high-lighting.
Two questions..
- Why are file extensions rarely used on shell scripts?
- If I start using a file extension (like "sh") what would be the most appropriate extension for bash scripts?
And a third questions...
- What is the best editor (your opinion) in the Suse distro (I'm using 8.1) for shell programming? For PHP programming?
Thanks!
Matt
On Tuesday 15 July 2003 4:18 pm, Matt Stamm wrote:
A question about shell programming and the Kate editor (or KWrite).
When using Kate (or KWrite) for shell programming I normally do not get sytnax high-lighting. I assume this is because most scripts do not have a file extension. If I add the file extension "sh" then I get syntax high-lighting. [...]
You can also force a hignlighting mode in Kate with Tools->Highlight Mode->Scripts->Bash Loads of others, too.
Two questions..
- Why are file extensions rarely used on shell scripts?
- If I start using a file extension (like "sh") what would be the most appropriate extension for bash scripts?
Whatever you like. Usually there is none. You just need to remember to set the execute flag using chmod.
And a third questions...
- What is the best editor (your opinion) in the Suse distro (I'm using 8.1) for shell programming? For PHP programming?
Kate is nice. I also quite like Joe's Own Editor (joe) on the command line. Dig those Wordstar control keys -- takes me back to Turbo Pascal days. And Quanta Plus is excellent for HTML/PHP work. Get a recent version if you can. Details at quanta.sourceforge.net I'm running the current CVS version. Good stuff. HTH, Jason
participants (3)
-
Jason
-
Matt Stamm
-
Paul Benjamin