finished base commands page

git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@96 a672b425-5310-4d7a-af5c-997e18724b81
This commit is contained in:
rasicd 2018-11-11 12:17:16 +00:00
parent 8f8ebcbfa0
commit cddb59c190

View File

@ -1,51 +1,60 @@
<!DOCTYPE html>
<html>
<head>
---
layout: page
category-page: scripts
category-title: Scripting
tags: command base echo cat grep
author: Dario Rasic
title: Script Base Commands
---
</head>
<body>
<!-- Echo command text -->
<h3>Echo</h3>
<p>This command print as output its entire argument on the command-line.<br>
It could be used with variables, like in the following example:</p>
<pre>
$ example:"this is an example"
<br>
$ <b>echo</b> $example<br>
this is an example
<pre>
<br>
<h2>Echo</h2>
<p>This command print as output its entire argument on the command-line.<br>
It could be used with variables, like in the following example:<br>
<pre>
$ example:"this is an example"
<br>
$ <b>echo</b> $example<br>
this is an example
</pre>
<br>
<!-- Cat command text -->
<h3>Cat</h3>
<p>This command prints the content of a certain file as an output on the command-line.</p>
<p>As example, we could imagine a simple text file in pages named "Hello", which contains the line "Hello World".<br>
So, our command example will look like this:</p>
<pre>
$ pages Hello
$ <b>cat</b> Hello<br>
Hello World</p>
<pre>
<br>
<h2>Cat</h2>
This command prints the content of a certain file as an output on the command-line.<br>
As example, we could imagine a simple text file in pages named "Hello", which contains the line "Hello World".<br>
So, our command example will look like this:<br>
<pre>
$ pages Hello
$ <b>cat</b> Hello<br>
Hello World
</pre>
<br>
<!-- Grep command text -->
<h3>Grep</h3>
<p>This one behaves very similarly to the previus one, but in this case it prints only the lines matching a certain pattern.<br>
In this we could imagine a certain text file "animals", which contains a list of animal-names.</p>
<p>If we want to select only the animals whose name begins with the letter "d", we will write this:<br>
<hr>
<p>$ grep d animals<br>
Deer<br>
Dog<br>
Dolphin<br>
...
<br>
<hr>
<br>
<h2>Grep</h2>
This one behaves very similarly to the previus one, but in this case it prints only the lines matching a certain pattern.<br>
In this we could imagine a certain text file "animals", which contains a list of animal-names.
If we want to select only the animals whose name begins with the letter "d", we will write this:<br>
<pre>
$ grep d animals<br>
Deer<br>
Dog<br>
Dolphin<br>
...
</pre>
</body>
</html>
</p>