# data unload using shell

**URL:** <https://community.unix.com/t/data-unload-using-shell/284239>\
**Category:** Shell Programming and Scripting\
**Created:** [March 10, 2011, 5:25am UTC](https://community.unix.com/t/data-unload-using-shell/284239 "2011-03-10T05:25:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dvah](https://community.unix.com/letter_avatar/dvah/32/6_449c533f586939b6e5f246632a46421f.png) [@dvah](https://community.unix.com/u/dvah)\
**Post date:** [March 10, 2011, 5:25am UTC](https://community.unix.com/t/data-unload-using-shell/284239/1 "2011-03-10T05:25:00Z")

</div>

hi,  
I work on oracel 10g unix system.

I need to unload data from few tables to a unl file using shell script. I've a file which contains the list of tables. The shell has to refer to this list and create a unl for each table.

Table\_list.txt

table1|  
table2|  
table3|

has to create three unl's

I've worked on Informix db, its quite simple there, just UNLOAD TO would do. But i cudnt get the equivalent one in Oracle.

Thanks!

---

<div class="post-metadata">

**Author:** ![Shell\_Life](https://community.unix.com/user_avatar/community.unix.com/shell_life/32/521_2.png) [@Shell\_Life](https://community.unix.com/u/Shell_Life)\
**Post date:** [March 10, 2011, 2:51pm UTC](https://community.unix.com/t/data-unload-using-shell/284239/2 "2011-03-10T14:51:53Z")

</div>

> [@](#):
>
> I've worked on Informix db, its quite simple there, just UNLOAD TO would do. But i cudnt get the equivalent one in Oracle.

Dvah, this site is to help with unix related issues/questions.

If you have a question on Oracle table unload, you better off post your question on an Oracle forum.

After you find out your unload question, here is a generic shell that could work for you:

```plaintext
#!/bin/ksh
IFS='|'
while read mTabName
do
  echo "Now unloading <${mTabName}>"
  <<< your unloading statements here >>>
done < table_list.txt

```
