Help:Using the command line: Difference between revisions

bold
imported>Leoetlino
(remove Guides (tools) as we have tool pages now)
imported>Leoetlino
(bold)
 
Line 26: Line 26:
  command_name  argument_1  argument_2  argument_3 ...
  command_name  argument_1  argument_2  argument_3 ...


The first word is the command name. It is the name of the program you are going to invoke.
The first word is the '''command name'''. It is the name of the program you are going to invoke.


Anything that comes after from are arguments. They tell the program what it should do or what to operate on. For example, the copy command takes the source file as the first parameter and the destination file as the second. You would type:
Anything that comes after from are '''arguments'''. They tell the program what it should do or what to operate on. For example, the copy command takes the source file as the first parameter and the destination file as the second. You would type:


  copy C:/source_file C:/destination
  copy C:/source_file C:/destination
Line 37: Line 37:
What about optional parameters? And what if a command takes a large amount of parameters? To avoid requiring the user to memorise the argument order when there are too many, CLI utilities typically use options.
What about optional parameters? And what if a command takes a large amount of parameters? To avoid requiring the user to memorise the argument order when there are too many, CLI utilities typically use options.


Options are just another way to give parameters. They almost always have the following form: <code>--optionname option_value</code>, can usually be combined and reordered, and are usually optional.
'''Options are just another way to give parameters.''' They almost always have the following form: <code>--optionname option_value</code>, can usually be combined and reordered, and are usually optional.


==== On paths ====
==== On paths ====
Line 46: Line 46:
''See [[Help:Setting up tools]] for installing Python.''
''See [[Help:Setting up tools]] for installing Python.''


* Instructions on this wiki will often use the <code>python3</code> command. Replace <code>python3</code> with <code>py -3</code> on Windows.
* Instructions on this wiki will often use the <code>python3</code> command. '''Replace <code>python3</code> with <code>py -3</code> on Windows.'''
* To install a package, use <code>py -3 -m pip install <package name></code>. For example, to install eventeditor, run <code>py -3 -m pip install eventeditor</code>.
* To '''install a package''', use <code>py -3 -m pip install <package name></code>. For example, to install eventeditor, run <code>py -3 -m pip install eventeditor</code>.


[[Category:Guides]]
[[Category:Guides]]
Anonymous user