Using an editor or the cat command, write a script that uses a variable. Note that this script uses the bash shell on LINUX, but you can also use the ksh shell with UNIX.
1) Set a value for the variable first using typeset then check it using set.
[root@vmpc_rh804 root]# typeset first=you
[root@vmpc_rh804 root]# set | more
BASH=/bin/bash
BASH_ENV=/root/.bashrc
BASH_VERSINFO=([0]="2" [1]="05b" [2]="0" [3]="1" [4]="release" [5]="i686-pc-linu
x-gnu")
BASH_VERSION='2.05b.0(1)-release'
COLORS=/etc/DIR_COLORS
.
.
.
first=you
hi=hello
langfile=/root/.i18n
2) Write a short Welcome script that uses a variable.
[root@vmpc_rh804 root]# cat > Welcome.bash
#!/bin/bash
#
first=Student
echo "Welcome to Linux $first"
Ctrl/D
3) Execute your script using the shell interpreter.
$ bash Welcome.bash
Welcome to Linux Student
Second monitor no display after latest update - KDE-neon
-
After latest update as of Oct 3, 2023, my second monitor was undetected
with latest kernel (6.2.0-33-generic). If I boot with previous kernel, it
can be...
6 months ago
No comments:
Post a Comment