Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New file extensions
#8
(07-31-2017, 05:20 PM)Simbax Wrote: Shell scripts still have a file extension
Actually, they often come with no extension at all. You probably don't even realize how often programs you run on Linux are actually shell scripts. Just by randomly looking at some files in /usr/bin I found at least pip, lsb_release and ssh-copy-id.
[Image: 9ph034i.png]

(07-31-2017, 05:20 PM)Simbax Wrote: it's not like there are different highlighters for different shells, are there?
Shebangs are not only for shells but also for all kinds of other interpreted languages like Python, Perl, PHP etc.

(07-31-2017, 05:20 PM)Simbax Wrote: The first line is for the shell to recognize which program to use when running them like ./script.txt, not for editors.
I know for a fact thay both vim and IntelliJ IDEs set the syntax highlighting correctly based on a shebang, I never tried it on anything else. Jenkins' docs even recommend adding a shebang to Jenkinsfile just for the sake of syntax highlighting in editors.


Messages In This Thread
New file extensions - by Simbax - 07-31-2017, 11:58 AM
RE: New file extensions - by tomangelo - 07-31-2017, 12:18 PM
RE: New file extensions - by RaptorParkowsky - 07-31-2017, 12:34 PM
RE: New file extensions - by tomangelo - 07-31-2017, 12:48 PM
RE: New file extensions - by krzys_h - 07-31-2017, 03:57 PM
RE: New file extensions - by radioactivity - 07-31-2017, 04:30 PM
RE: New file extensions - by Simbax - 07-31-2017, 05:20 PM
RE: New file extensions - by krzys_h - 07-31-2017, 09:31 PM
RE: New file extensions - by Simbax - 08-01-2017, 07:38 AM
RE: New file extensions - by tomaszkax86 - 08-01-2017, 01:33 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)