Linux [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Linux [Electronic resources] - نسخه متنی

Janet Valade

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


echo (display text)


Displays the text or variables specified.

Format: echo

textstring
Examples: echo Hello World
echo $HOME

The first example displays Hello World on the screen. The second example displays the contents of the variable HOME. $ indicates that HOME is a variable. HOME contains the path to your home directory, so the second example displays the path to your home directory on the screen.

You can use some special characters with the echo command to format the output, shown in the first table below. The second table shows the most useful options for echo.

Char

What It Does

Example

\a

Alert (rings bell)

echo \aerror

\b

Backspace

echo \bHello

\c

Suppress new line

echo $text_line\c

\f

Form feed

echo Hello World\f

\n

Start a new line

echo Hello \nWorld

\r

Carriage return

echo Hello World\r

\t

Insert a tab

echo Hello \tWorld

\v

Insert a vertical tab

echo \vHello World

\\

Literal

echo This is a backslash \\

Opt

What It Does

Example

-n

Don't start a new line after text


echo -n Hello
echo " World
Hello World


    / 357