The UNIX and Linux Forums  

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
Urgent for shell script sunnysunny Shell Programming and Scripting 4 03-04-2008 11:42 AM
Script Needed Urgent in shell or PERL!!!!!!!!!!!!!!!!!!!! aajan Shell Programming and Scripting 1 10-24-2007 01:28 AM
Urgent help needed - shell script aarora_98 SUN Solaris 3 01-25-2007 10:26 AM
Calling CGI Perl in Shell script [urgent] DeepakXavier Shell Programming and Scripting 0 10-08-2005 10:51 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 4 Weeks Ago
Registered User
 

Join Date: Aug 2008
Posts: 3
Need help in shell script (Urgent : Please help)

i have load.bat file in my windows ...IN WINDOWSwe have a loader.exe file which loads the data in some queue.We keep this data in a particular folder i.e "in" folder. Now this loader.exe file picks the data from the "in" folder and loads it in an MQueue.I dont know exactly how this loader.exe file works but w.r.t this questn i dont think its imp...Now we created a load.bat file c:cd c:/prjct/Java/bin ( )Loader.exe -t ABC.cfg -f c:/prjct/Java/in/DataLoader.exe -t DEF.cfg -f c:/prjct/Java/in/Data1Things in bold above is contained in load.bat file....as i told you "in" is the folder where we have data which is picked up by loader.exeABC.cfg and DEF.cfg files are 2 config files( Since data is in GFF i.e Generic File Format)IN UNIXNow i need a shell script which does the same work as "load.bat" . ( I guess i have loader.exe in my unix box...and it works fine....)i just need a shell script syntax which does the same thing as load.bat file did in windowsURGENT
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 4 Weeks Ago
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 674
Post

Quote:
Originally Posted by vnmshenoy View Post
i have load.bat file in my windows ...IN WINDOWSwe have a loader.exe file which loads the data in some queue.We keep this data in a particular folder i.e "in" folder. Now this loader.exe file picks the data from the "in" folder and loads it in an MQueue.I dont know exactly how this loader.exe file works but w.r.t this questn i dont think its imp...Now we created a load.bat file c:cd c:/prjct/Java/bin ( )Loader.exe -t ABC.cfg -f c:/prjct/Java/in/DataLoader.exe -t DEF.cfg -f c:/prjct/Java/in/Data1Things in bold above is contained in load.bat file....as i told you "in" is the folder where we have data which is picked up by loader.exeABC.cfg and DEF.cfg files are 2 config files( Since data is in GFF i.e Generic File Format)IN UNIXNow i need a shell script which does the same work as "load.bat" . ( I guess i have loader.exe in my unix box...and it works fine....)i just need a shell script syntax which does the same thing as load.bat file did in windowsURGENT
Reformatted so it's actually readable - on most days I'd never bother to even _try_ and read that solid block of text (grumble grumble):
Quote:
Originally Posted by vnmshenoy (sort of) View Post
i have load.bat file in my windows.
IN WINDOWS we have a loader.exe file which loads the data in some queue. We keep this data in a particular folder i.e "in" folder.

Now this loader.exe file picks the data from the "in" folder and loads it in an MQueue. I dont know exactly how this loader.exe file works but w.r.t this question i dont think its important.

Now we created a load.bat file:
Code:
c:
cd c:/prjct/Java/bin
Loader.exe -t ABC.cfg -f c:/prjct/Java/in/Data
Loader.exe -t DEF.cfg -f c:/prjct/Java/in/Data1
Things in bold above is contained in load.bat file.
As i told you, "in" is the folder where we have data which is picked up by loader.exe.
ABC.cfg and DEF.cfg files are 2 config files( Since data is in GFF i.e Generic File Format)

IN UNIX now i need a shell script which does the same work as "load.bat" . ( I guess i have loader.exe in my unix box...and it works fine....)
I just need a shell script syntax which does the same thing as load.bat file did in windows
URGENT
This shell script should do the trick:
Code:
#!/bin/sh

LOADER="/path/to/Loader.exe"    # Change the stuff in "" to be the full directory and name of your Loader program

cd `dirname "$LOADER"`
$LOADER -t ABC.cfg -f `dirname "$LOADER"`/in/Data
$LOADER -t DEF.cfg -f `dirname "$LOADER"`/in/Data1
Reply With Quote
  #3 (permalink)  
Old 4 Weeks Ago
cfajohnson's Avatar
Registered User
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 487
Quote:
Originally Posted by vnmshenoy View Post
i have load.bat file in my windows

...IN WINDOWS we have a loader.exe file which loads the data in some queue. We keep this data in a particular folder i.e "in" folder. Now this loader.exe file picks the data from the "in" folder and loads it in an MQueue.

What's an MQueue?
Quote:
I dont know exactly how this loader.exe file works but w.r.t this questn i dont think its imp...Now we created a load.bat file

c:cd c:/prjct/Java/bin ( )Loader.exe -t ABC.cfg -f c:/prjct/Java/in/DataLoader.exe -t DEF.cfg -f c:/prjct/Java/in/Data1

Things in bold above

Nothing above is in bold.

When posting code, please put it in [code] tags.
Quote:
is contained in load.bat file....as i told you "in" is the folder where we have data which is picked up by loader.exeABC.cfg and DEF.cfg files are 2 config files( Since data is in GFF i.e Generic File Format)

What's Generic File Format?
Quote:
IN UNIX Now i need a shell script which does the same work as "load.bat" .

What does load.bat do?
Quote:
( I guess i have loader.exe in my unix box...and it works fine....)

There are no .exe files in UNIX.
Quote:
i just need a shell script syntax which does the same thing as load.bat file did in windowsURGENT

What's windows?
Reply With Quote
  #4 (permalink)  
Old 4 Weeks Ago
Ikon's Avatar
Registered User
 

Join Date: Jul 2008
Location: Phoenix, Arizona
Posts: 181
Guess this should have been posted in windows forum and not "UNIX for Dummies Questions & Answers"
Reply With Quote
  #5 (permalink)  
Old 4 Weeks Ago
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 674
Quote:
Originally Posted by Ikon View Post
Guess this should have been posted in windows forum and not "UNIX for Dummies Questions & Answers"
Not true, the OP is asking for a unix shell script (based on the windows batch file he provided called 'load.bat') that will run his unix version of Loader.exe on a unix box.

An incredibly badly formatted post but the actual question makes perfect sense (assuming I've correctly interpreted the post )
Reply With Quote
  #6 (permalink)  
Old 4 Weeks Ago
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 674
Quote:
Originally Posted by cfajohnson View Post
What's an MQueue?
I guessed the OP was refering to an MQ series queue, but I suspect it's not actually all that important as it appears to be just a matter of converting a batch file to a shell script
Reply With Quote
  #7 (permalink)  
Old 4 Weeks Ago
Registered User
 

Join Date: Aug 2008
Posts: 3
true dragon... you interpreted it correctly. Thanks for your help.I will try that shell script. Going ahead will take care of formatting....
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:14 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0