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
Renew letsencrypt ssl certificate for zimbra 8.8.15
-
Letsencrypt certs usually consists of these files:
1. cert.pem
2. chain.pem
3. fullchain.pem
4. privkey.pem
I am not going to discuss about how you ...
4 weeks ago
No comments:
Post a Comment