The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
need help for shell programming thungmail Shell Programming and Scripting 3 04-02-2008 03:55 PM
shell programming nivas Shell Programming and Scripting 8 02-11-2008 12:06 PM
Aix Shell Programming akmtcs AIX 1 12-07-2006 08:40 AM
shell programming Neha Agarwal Shell Programming and Scripting 2 09-07-2005 02:23 AM
Shell Programming Help mec585858 UNIX for Dummies Questions & Answers 4 12-10-2003 10:24 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-01-2001
JWK1 JWK1 is offline
Registered User
  
 

Join Date: May 2001
Posts: 3
Question Shell Programming

I have a fix_table.ksh script that takes a TABLENAME and a date.

So, in jk_table_file.txt I have the tables...one per line, and
in jk_out_file.txt I have the date in the format I need.

The following doesn not 'want' to work in a shell script...

for TABLE in `cat jk_table_file.txt`; do
`./fix_table.ksh $TABLE < jk_out_file.txt`

Any suggestions?
thanks.
  #2 (permalink)  
Old 06-01-2001
PxT's Avatar
PxT PxT is offline Forum Advisor  
Registered User
  
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
Re: Shell Programming

Quote:
Originally posted by JWK1


for TABLE in `cat jk_table_file.txt`; do
`./fix_table.ksh $TABLE < jk_out_file.txt`

remove the backticks around the second line so that it reads:

for TABLE in `cat jk_table_file.txt`
do
./fix_table.ksh $TABLE < jk_out_file.txt
done
  #3 (permalink)  
Old 06-01-2001
JWK1 JWK1 is offline
Registered User
  
 

Join Date: May 2001
Posts: 3
Thanks for the response...

After taking the tick marks out:

for TABLE in `cat jk_table_file.txt`; do
./fix_table.ksh $TABLE < jk_out_file.txt
done

The message below is spit out after running it.
USAGE: fix_table.ksh tablename YYYY-MM-DD

If I were to fun fix_table from the command line:
fix_table.ksh calldata 2001-05-31


???
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 01:07 PM.


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