Need help in shell script (Urgent : Please help)


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Need help in shell script (Urgent : Please help)
# 1  
Old 08-06-2008
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
# 2  
Old 08-06-2008
Java

Quote:
Originally Posted by vnmshenoy
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)
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

# 3  
Old 08-06-2008
Quote:
Originally Posted by vnmshenoy
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?
# 4  
Old 08-06-2008
Guess this should have been posted in windows forum and not "UNIX for Dummies Questions & Answers"
# 5  
Old 08-06-2008
Quote:
Originally Posted by Ikon
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 Smilie)
# 6  
Old 08-06-2008
Quote:
Originally Posted by cfajohnson
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 Smilie
# 7  
Old 08-07-2008
true dragon... you interpreted it correctly. Thanks for your help.I will try that shell script. Going ahead will take care of formatting.... Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script urgent help please

Hello, I have below string, even I have hundreds of lines in a file. I want to exactly match last two consecutive strings. 2017-09-30|ACBD,TVF|01234|NULL|18|NULL|686091802|BANK OF ABCD, LIMITED, THE|2017-09-30 00:00:00 I want to extract the string 2017-09-30 00:00:00 How can I do... (1 Reply)
Discussion started by: shellquery26666
1 Replies

2. Shell Programming and Scripting

Shell script assistance Urgent

write a script using shift and case to receive 11 argument and do the following --arg1 - print hello message and the current proccess id --arg2 - read and edit a file based on the value which came along with the arg2. --arg3 - validate whether all... (1 Reply)
Discussion started by: saku
1 Replies

3. Shell Programming and Scripting

URGENT Reading a file and assessing the syntax shell script URGENT

I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies

4. Shell Programming and Scripting

Need urgent help with korn shell script

Hi All, Need urgent help with korn shell script, which monitors AIX WPARs Status. Basically WPARs run on a LPAR, So there is a Command "lswpar" which displays WPARs status. This script should be checking the WPARs Status and email support if WPAR is down or broken. General lswpar output is as... (3 Replies)
Discussion started by: aix_admin_007
3 Replies

5. Shell Programming and Scripting

URGENT HELP ON A SHELL SCRIPT

I have been asked to create a shell script that accepts a number of SQL select queries as input, runs them in sequence, spools the output to an EXCEL workbook, where, each worksheet is an output of a Select statement run above. The workbook should be in a .XLS format. If a particular select... (1 Reply)
Discussion started by: ShellNovice1
1 Replies

6. Shell Programming and Scripting

Needed urgent help with shell script

Hi, Thanks for the reply to the previous posting.I need a shell script to the following.I am entirely new to the comapny and please help me with this. 1) Create the file with a timestamp i.e. nrt_readership.mmddyyyyhhmm 2) The processing job will look for files of the pattern... (0 Replies)
Discussion started by: pharishraja
0 Replies

7. Shell Programming and Scripting

(Urgent):Creating flat file using sql script and sqlplus from UNIX Shell Script

Hi, I need help urgently for following issue. Pls help me to resolve this issue. I am calling sql script file(file1.sql) from UNIX Shell Script(script1.ksh) using sql plus and trying to create flat file that contains all records returned from SQL query in SQL script(file1.sql) I given... (6 Replies)
Discussion started by: praka
6 Replies

8. Shell Programming and Scripting

Urgent for shell script

Hi friends, I am working as a DataStage developer. I need help in writing shell script. I have following file and I want to remove data from 1st field and store it into other file. Convert this file, A100 Tylenol 100mg A100 PCML 500mg B120 CFDR 250mg C345 PFLX 600mg ... (4 Replies)
Discussion started by: sunnysunny
4 Replies

9. Solaris

Urgent help needed - shell script

Dear friends, I am trying to prepare a shell script which do the following task. Being a beginner in scripting I need a bit of help from you all for shell script which does the following job. 1.Check for existence of a file in a shared directory (at some remote location ) once in a day ... (3 Replies)
Discussion started by: aarora_98
3 Replies
Login or Register to Ask a Question