Differences between revisions 10 and 27 (spanning 17 versions)
Revision 10 as of 2005-01-18 06:41:09
Size: 474
Editor: anonymous
Comment:
Revision 27 as of 2019-11-20 11:14:22
Size: 1146
Editor: PhilWyett
Comment: Remove two dead links.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## Auto-converted by kwiki2moinmoin v2005-10-07
["Shell"]>["Bash"]
-------
ShellScript is a ["Script"] written for the ["Shell"] (["Bash"]). They are similar to *.bat files in Windows.
##language en
Line 6: Line 3:
The MIME tipe is application/x-shellscript ||<tablestyle="width: 100%;" style="border: 0px hidden">~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[it/ShellScript|Italiano]]-~||<style="text-align: right;border: 0px hidden"> (!) [[/Discussion|Discussion]]||
----
Line 8: Line 6:
They are text files which first line says the shell to use (bash). So the first line is
Line 10: Line 7:
#!/bin/bash A '''[[https://en.wikipedia.org/wiki/Shell_script|Shell script]]''' is a script written for the [[Shell]]. Shell scripts use ShellCommands and a specific syntax. Operations performed by shell scripts include file manipulation, program execution, and printing text.
Line 12: Line 9:
After this, you can include comments using # in the beginning of the line. For example: A script is a text file, which ''may or may not'' have the file extension {{{.sh}}}. The first line of the file [[https://en.wikipedia.org/wiki/Shebang_(Unix)|(shebang)]] indicates which interpreter/shell should execute the rest of the script:
Line 14: Line 11:
#This is a comment.  {{{#!text
#!/bin/sh
}}}
Line 16: Line 15:
Finally, the ["Bash"] commands.
The [[MIME]] type of shell scripts is {{{application/x-shellscript}}}

{{{.bat}}} or {{{.cmd}}} are basic equivalents on Windows.

== External links ==

 * http://steve-parker.org/sh/sh.shtml - Linux Shell Scripting Tutorial

-----

CategoryCommandLineInterface | CategoryRedundant: merge with ShellCommands/other shell pages

Translation(s): English - Italiano

(!) ?Discussion


A Shell script is a script written for the Shell. Shell scripts use ShellCommands and a specific syntax. Operations performed by shell scripts include file manipulation, program execution, and printing text.

A script is a text file, which may or may not have the file extension .sh. The first line of the file (shebang) indicates which interpreter/shell should execute the rest of the script:

  • #!/bin/sh

The MIME type of shell scripts is application/x-shellscript

.bat or .cmd are basic equivalents on Windows.


CategoryCommandLineInterface | CategoryRedundant: merge with ShellCommands/other shell pages