The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Method to exit a for loop Rohini Vijay Shell Programming and Scripting 2 11-01-2006 05:56 AM
Is there any way to unload *.so by force? princelinux Linux 0 04-10-2006 12:18 PM
which encryption method? crashnburn Shell Programming and Scripting 2 08-01-2002 11:41 PM
Backup method synamics UNIX for Advanced & Expert Users 2 11-05-2001 04:55 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-02-2007
cedrichiu cedrichiu is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 17
Unload utility with loop method

Hi,

I just wonder why the unload tools from INFORMIX doesn't unload all required file to every output of mOutFile at the accumulative way OR my script has an error ? In fact it just unload to one single record at the latest.


Code:

for mFile in x???
do
  echo "Now working with file "$mFile" at "`date`
  mOutFile=$mFile".unl"
  while read mLine
  do
    _customer_t=$(echo $mLine | cut -d "|" -f 1)
    echo "unload to $mOutFile select cust_num from customer where customer_t=$_customer_t;" | dbaccess demo
  done < $mFile
done

Please advise.. Cheers

Regards,
  #2 (permalink)  
Old 07-02-2007
kahuna's Avatar
kahuna kahuna is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 149
cedrichiu

I think you are overlaying $mOutFile.


Code:

    echo "unload to tmpfile select cust_num from customer where customer_t=$_customer_t;" | dbaccess demo
    
    cat tmpfile >>$mOutFile 
    


Last edited by kahuna; 07-02-2007 at 09:59 AM.. Reason: Oops, I had some extra quotes
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:25 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0