WEBVTT

00:08.560 --> 00:16.160
The right host Come on let displays specify objects to the console money use money.

00:16.240 --> 00:19.120
Come on let's say you're down to your right.

00:19.120 --> 00:20.690
Host come on land.

00:20.770 --> 00:29.890
Since the objects passed along a pipeline and are displayed by default by default for matter but on

00:29.950 --> 00:35.740
other occasions for instance in the first example in the Presidium read.

00:35.740 --> 00:44.640
Host listen if you want to see the welfare of a variable you can use the right host command led to displayed

00:45.010 --> 00:53.100
but its not necessary to write write host variable name will display the same information.

00:53.140 --> 01:02.200
If you type just a variable name the right host command led becomes more useful when you want to customize

01:02.290 --> 01:04.180
the display in some way.

01:04.180 --> 01:12.550
For example you can specify the background color or the foreground color or the well your to be displayed.

01:12.700 --> 01:18.870
In addition to the common parameters the right host command block supports the following parameters

01:19.110 --> 01:20.030
object.

01:20.080 --> 01:28.930
Its a positional parameter in position one specifies the object or objects that are to be written to

01:28.930 --> 01:29.980
the console.

01:30.160 --> 01:31.630
No new line.

01:31.630 --> 01:37.290
A boolean parameter if present after 11 is written to the console.

01:37.330 --> 01:41.340
It's not followed by a newline separator.

01:41.490 --> 01:49.960
A screen to be output to the console when multiple objects are processed by the right host Come on let

01:50.290 --> 01:57.820
the well you're of the stream and is used as the separator between the well used to be displayed background

01:57.850 --> 01:58.680
color.

01:58.870 --> 02:05.010
This perimeter specifies the background color and foreground color parameter.

02:05.050 --> 02:07.840
It specifies the foreground color.

02:08.080 --> 02:10.680
You use the command line out right.

02:10.690 --> 02:11.490
Host.

02:11.710 --> 02:20.230
If you want to output information that is being processed on a pipeline in such scenarios no output

02:20.230 --> 02:22.020
is displayed by default.

02:22.120 --> 02:24.660
For example the following code.

02:24.770 --> 02:26.110
Right host.

02:26.170 --> 02:26.610
Test.

02:26.620 --> 02:27.940
Don't be a swan.

02:28.090 --> 02:28.510
That too.

02:28.520 --> 02:36.760
Well yes the read in from the command line would simply exist as the variables name and pass for and

02:36.760 --> 02:46.000
not be displayed since the to write statements are command to tout in some sentence that may be what

02:46.000 --> 02:46.850
you want.

02:47.020 --> 02:55.870
However if objects are being passed along the pipeline suggesting they get process statement that objects

02:55.870 --> 03:00.390
are passed to the default for matter and then displayed.

03:00.640 --> 03:03.780
Let's run the code with the following command.

03:03.780 --> 03:10.220
It seems that the script file is in the current directory and we can see the result.

03:10.270 --> 03:17.260
We can see that there is no output for the variable name and parse for it on the screen.

03:17.440 --> 03:23.260
If you want to display the wellness of name and the password you can just anchorman's the lines with

03:23.250 --> 03:25.490
the right host command left.

03:25.570 --> 03:33.080
If you want the reli of phosphor to rebuild to be visible in clear text just use the technique which

03:33.080 --> 03:38.550
I've shown in the Brisard in less than on the read host command left.

03:38.610 --> 03:46.870
Now as I think the most useful of right host is left foreground color and background color parameters

03:47.110 --> 03:55.330
which allow you to alter the color on the text or the background when written to the host using the

03:55.570 --> 04:03.070
right host command let the perimeter support the named Koehler's which are enumerated in the following

04:03.070 --> 04:03.860
table.

04:03.910 --> 04:08.810
When you saw the right host command letters to highlight Romes to the user.

04:08.950 --> 04:10.230
For example instead of.

04:10.230 --> 04:18.340
You can read hosta alone to read in data from the user you can use the right host command glad to display

04:18.340 --> 04:26.770
a more visible broomed to the user then use the read host command letter and capturing the user input

04:26.830 --> 04:28.180
in a variable.

04:28.180 --> 04:32.080
Let's take a look at that for an example that shows you how.

04:32.110 --> 04:40.060
Notice that there are no new line parameters used to keep the cursor at the end of the line where the

04:40.060 --> 04:41.920
text was fired.

04:42.070 --> 04:46.200
Well are the right host C'mon left is displayed.

04:46.250 --> 04:54.040
Just to let the foreground color and background color parameters are used to highlight the prompt to

04:54.040 --> 04:55.100
the user.

04:55.120 --> 05:01.540
You can of course abbreviate the name so the foreground color around background color or lower parameters

05:01.990 --> 05:07.270
is just type in F Oh and B.A instead of four.

05:07.270 --> 05:15.510
Ground color and background color so you may want to use the right host Come on left to display Vorderman

05:15.540 --> 05:20.530
and information messages in particular color combinations.

05:20.530 --> 05:22.000
The following code.

05:22.180 --> 05:22.550
Right.

05:22.550 --> 05:24.130
Host color test.

05:24.230 --> 05:34.120
The best one displays ever wardman in red text on white and information in black text also on white.

05:34.240 --> 05:44.070
Output shows the results after entering a password to six characters or shorter them and in a box for

05:44.200 --> 05:46.500
the required 8 characters.

05:46.520 --> 05:55.810
The wearable Lohmann office set initially falls and while loop tests whether or not the lens property

05:56.200 --> 06:00.100
or the password wearable is at least eight characters.

06:00.100 --> 06:08.740
If it is then the value of long enough is set to true if not have worn and is displayed in red text

06:08.740 --> 06:16.660
on a white background and the user was prompted to re-enter the user name and password.

06:16.840 --> 06:25.180
Once the past for two of the specified lands has been entered there while loop exist and an information

06:25.180 --> 06:31.090
message specified in the following code is displayed in black text on white.
