# About the Shell Programming and Scripting category

**URL:** <https://community.unix.com/t/about-the-shell-programming-and-scripting-category/138059>\
**Category:** Shell Programming and Scripting\
**Created:** [March 15, 2020, 7:14pm UTC](https://community.unix.com/t/about-the-shell-programming-and-scripting-category/138059 "2020-03-15T19:14:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://community.unix.com/uploads/default/original/2X/c/c7e9e16a595259edafe88615719d5c5dcda035c2.png) [@system](https://community.unix.com/u/system)\
**Post date:** [March 15, 2020, 7:14pm UTC](https://community.unix.com/t/about-the-shell-programming-and-scripting-category/138059/1 "2020-03-15T19:14:07Z")

</div>

Shell scripting. Post awk, bash, ksh, perl, php, python, ruby, sed, sh, shell scripts, and other shell scripting languages questions here.

---

<div class="post-metadata">

**Author:** ![ChiruP](https://community.unix.com/letter_avatar/chirup/32/6_449c533f586939b6e5f246632a46421f.png) [@ChiruP](https://community.unix.com/u/ChiruP)\
**Post date:** [February 22, 2021, 6:24am UTC](https://community.unix.com/t/about-the-shell-programming-and-scripting-category/138059/3 "2021-02-22T06:24:42Z")

</div>

please, could you explain regarding the following coding in bash shell script and what will be output?:  
#!/usr/bin/env bash  
set -e  
LOGFILE=INSTALL.log  
if [-f $LOGFILE] ; then  
rm $LOGFILE  
fi

---

<div class="post-metadata">

**Author:** ![atulrd65](https://community.unix.com/letter_avatar/atulrd65/32/6_449c533f586939b6e5f246632a46421f.png) [@atulrd65](https://community.unix.com/u/atulrd65)\
**Post date:** [March 3, 2021, 12:13am UTC](https://community.unix.com/t/about-the-shell-programming-and-scripting-category/138059/4 "2021-03-03T00:13:23Z")

</div>

I have a string  
jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS\_LIST=(LOAD\_BALANCE=on)(ADDRESS=(PROTOCOL=tcp)(HOST=host01)(PORT=1525))(ADDRESS=(PROTOCOL=tcp)(HOST=host02)(PORT=1525)))(CONNECT\_DATA=(SERVICE\_NAME=dbservice)))

In my script - want to extract string in above HOST=host01 and HOST=host02 to variables  
v\_host1(host01), v\_host2(host02)  
Then same for PORT= and SERVICE\_NAME=  
v\_port (1525) and v\_service\_nm(dbservice)

How to do this ?  
Thanks in advance  
Regards  
atul

---

<div class="post-metadata">

**Author:** ![Billynal](https://community.unix.com/letter_avatar/billynal/32/6_449c533f586939b6e5f246632a46421f.png) [@Billynal](https://community.unix.com/u/Billynal)\
**Post date:** [May 27, 2023, 12:09am UTC](https://community.unix.com/t/about-the-shell-programming-and-scripting-category/138059/5 "2023-05-27T00:09:53Z")

</div>

![image](https://community.unix.com/uploads/default/original/3X/d/7/d72619278af578bc00c2ae84bf6be768346af961.png)  
for purposes of testing the code i called it script.sh. There's a problem with line 4.

---

<div class="post-metadata">

**Author:** ![MadeInGermany](https://community.unix.com/letter_avatar/madeingermany/32/6_449c533f586939b6e5f246632a46421f.png) [@MadeInGermany](https://community.unix.com/u/MadeInGermany)\
**Post date:** [February 5, 2024, 3:35pm UTC](https://community.unix.com/t/about-the-shell-programming-and-scripting-category/138059/6 "2024-02-05T15:35:35Z")

</div>

Closed on February 5, 2024, 3:35pm UTC


