# Shell script

**URL:** <https://community.unix.com/t/shell-script/331148>\
**Category:** Shell Programming and Scripting\
**Created:** [June 28, 2013, 5:22am UTC](https://community.unix.com/t/shell-script/331148 "2013-06-28T05:22:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AraR87](https://community.unix.com/letter_avatar/arar87/32/5_5575768a8748004e209b776fc1b2916d.png) [@AraR87](https://community.unix.com/u/AraR87)\
**Post date:** [June 28, 2013, 5:22am UTC](https://community.unix.com/t/shell-script/331148/1 "2013-06-28T05:22:59Z")

</div>

Guys,  
Here is my requirement..  
i have a cfg as below

```nohighlight
 
example.cfg
LOG_PATH=/u/sample/sample.log
PATH=/u/sample/
MAIL=sample@gmail.com
ZIP_DAYS=7
PURGE_DAYS=30

LOG_PATH=/u/sample/sample.log
PATH=/u/sample/hello/test
MAIL=sample@gmail.com
ZIP_DAYS=5
PURGE_DAYS=25

```

here is my script logic..

I want to write a shell script to read these values using loop..Hope this can be done using stanzaget.

can anyone please give me some general script for this..

Thanks,

---

<div class="post-metadata">

**Author:** ![Just\_Ice](https://community.unix.com/user_avatar/community.unix.com/just_ice/32/165_2.png) [@Just\_Ice](https://community.unix.com/u/Just_Ice)\
**Post date:** [June 28, 2013, 8:35am UTC](https://community.unix.com/t/shell-script/331148/2 "2013-06-28T08:35:48Z")

</div>

see sample below ... note "." in front of filename on 2nd line ...

```nohighlight
#! /bin/ksh
. /dir/example.cfg # <-- read and import all values within example.cfg

..........
..........

exit 0

```
