• Nenhum resultado encontrado

Sample Output Welcome to Linux 2) Declare a variable and echo it value Assume you have a variable x which is assigned the value 45 i.e

N/A
N/A
Protected

Academic year: 2023

Share "Sample Output Welcome to Linux 2) Declare a variable and echo it value Assume you have a variable x which is assigned the value 45 i.e"

Copied!
1
0
0

Texto

(1)

Echo is a Unix/Linux command tool used for displaying lines of text or string which are passed as arguments on the command line. This is one of the basic command in linux and most commonly used in shell scripts. In this tutorial, we will look at the different options of echo command.

Basic Syntax

echo [option] [string]

1) Displaying a string on the terminal

To print text or a string on the terminal, use the syntax

echo [string]

$ echo "Welcome to Linux"

Sample Output

Welcome to Linux

2) Declare a variable and echo it value

Assume you have a variable x which is assigned the value 45 i.e.

$ x=10

You can print the value of variable x by executing the command

$ echo The value of x is $x Sample Output

The value of x is 10

Referências

Documentos relacionados

sobre um tipo particular de autômato que implicava na existência de um algoritmo de casamento de padrão com tempo proporcional a M + N no pior caso.. Breve Histórico