Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Shell script
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Life cycle== Shell scripts often serve as an initial stage in software development, and are often subject to conversion later to a different underlying implementation, most commonly being converted to [[Perl]], [[Python (programming language)|Python]], or [[C (programming language)|C]]. The [[interpreter directive]] allows the implementation detail to be fully hidden inside the script, rather than being exposed as a filename extension, and provides for seamless reimplementation in different languages with no impact on end users. While files with the ".sh" [[file extension]] are usually a shell script of some kind, most shell scripts do not have any filename extension.<ref>{{cite book |last1=Robbins |first1=Arnold |last2=Hannah |first2=Elbert |last3=Lamb |first3=Linda |url=https://books.google.com/books?id=J5nKVVg5YHAC |title=Learning the vi and Vim Editors |date=2008 |page=205 |publisher="O'Reilly Media, Inc." |isbn=9781449313258 }}</ref><ref>{{cite book |last=Easttom |first=Chuck |url=https://books.google.com/books?id=zZYLAAAAQBAJ |title=Essential Linux Administration:: A Comprehensive Guide for Beginners |date=2012 |page=228 |publisher=Course Technology/Cengage Learning |isbn=978-1435459571 }}</ref><ref>{{cite book | title = Linux Shell Scripting Essentials | last = Kumari | first = Sinny | quote = Rather than using a file extension for shell scripts, it's preferred to keep a filename without extension and let an interpreter identify the type by looking into shebang(#!). | publisher = Packt Publishing Ltd | date = November 23, 2015 | isbn = 9781783552375 | url = https://books.google.com/books?id=9vCoCwAAQBAJ&q=shell+script+file+extension&pg=PA2 | access-date = May 7, 2017 }}</ref><ref>{{cite book | title = Wicked Cool Shell Scripts, 2nd Edition: 101 Scripts for Linux, OS X and UNIX Systems | last1 = Taylor | first1 = Dave | last2 = Perry | first2 = Brandon | publisher = No Starch Press | date = December 16, 2016 | isbn = 9781593276027 | quote = Shell scripts don't need a special file extension, so leave the extension blank (or you can add the extension .sh if you prefer, but this isn't required. | url = https://books.google.com/books?id=Mpi7DQAAQBAJ&q=shell+script+file+extension&pg=PA5 | access-date = May 7, 2017 }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)