help with korn script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting help with korn script
# 1  
Old 02-10-2012
help with korn script

Hi guys,

I am new to unix scripting.

I have a folder rx and it has subfolders rx1,rx2 and rx3

each subfolder has 4 directories each load,land,arch and extr

I have the below tar and rm commands using wich we should write a shell script

rx1--
Code:
tar -cf $INFA_TGT_DIR/rx/rx1/arch/TELE.PNC.ACH.`date +%m-%d-%Y-%R`.gz * 
rm -f $INFA_TGT_DIR/rx/rx1/load/*.*


rx2--
Code:
tar -cf $INFA_TGT_DIR/rx/rx2/arch/[COLOR="rgb(0, 100, 0)"]ars.644366.out[/COLOR].`date +%m-%d-%Y-%R`.gz *
rm -f $INFA_TGT_DIR/rx/rx2/load/*.*


rx3--
Code:
tar -cf $INFA_TGT_DIR/rx/rx3/arch/[COLOR="rgb(0, 100, 0)"]ars.644362.out[/COLOR].`date +%m-%d-%Y-%R`.gz *
rm -f $INFA_TGT_DIR/rx/rx3/load/*.*

please help me to write a shell script for the above req

Last edited by Franklin52; 02-11-2012 at 09:01 AM.. Reason: Please use code tags for data and code samples, thank you
# 2  
Old 02-10-2012
Smilie

You have a shell script already. Is it not working?
# 3  
Old 02-10-2012
I have scripts which needs to be executed manually.I want some help in writing the script

---------- Post updated at 02:19 PM ---------- Previous update was at 02:17 PM ----------

I have scripts which needs to be executed manually.I want some help in writing the script which can do tar and rm in all the directories at the same time
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Pass script with parameter in korn shell script

I have written a script which will take input parameter as another script. However, if the script passed as input parameter has parameters then this script doesn't work. I have a script b.ksh which has 1 and 2 as parameters I have a script c.ksh which has 3,4 and 5 as parameters vi a.ksh... (1 Reply)
Discussion started by: Vee
1 Replies

2. Shell Programming and Scripting

perl script to korn shell script

I have a perl script which replaces "*" with "|" and "~" with "\n" also it takes the file content starting with ST till record starting with SE written a differnet file, I wanted this to be convereted into KSH script, can anyone help me perl script: perl -e ' $file_counter=0;... (7 Replies)
Discussion started by: atlantis_yy
7 Replies

3. Shell Programming and Scripting

pass null value to sql script from korn shell script

There are 4 parameters that I have to pass from korn shell to sql script. 1) I have to check if $1 , $2 , $3 and $4 are null values or not . How can I do that ? 2) Once its determined that these values are null (in the sense they are empty) how can I pass null values to sql script... (11 Replies)
Discussion started by: megha2525
11 Replies

4. Homework & Coursework Questions

Korn Shell Script

1. The problem statement, all variables and given/known data: Write a korn shell script with an alfanumeric string as argument. The script lists the file's names in the current directory that contain the given string as substring and that can be read and written. 2. Relevant commands, code,... (3 Replies)
Discussion started by: burm
3 Replies

5. Shell Programming and Scripting

Korn Shell Script

I have to solve some exercises in Korn Shell, but i'm having some problems. For example: Write a korn shell script with an alfanumeric string as argument. The script lists the file's names in the current directory that contain the given string as substring and that can be read and written. I... (3 Replies)
Discussion started by: burm
3 Replies

6. Shell Programming and Scripting

Running a BATCH script from my korn script with multiparameters

I've this BATCH script to run from my korn script... The command is /usr/local/BATCH/runBatch.sh PARAM1 'PARAM2 -PARAM21 PARAM22' (runBatch takes parameter 1 = PARAM1 parameter 2 = 'PARAM2 -PARAM21 PARAM22' ) If i run this command from command line it just runs fine... ... (7 Replies)
Discussion started by: prash184u
7 Replies

7. Shell Programming and Scripting

help with Korn script

Hello All.. Can someone tell me how to use "backspace" key in a script. I tried to use ^C (type from the keyboard) but its not working. I know its a silly question to ask but I am really frustated with this thing for good 1 hour or so. I am trying to provide an input file to a script so that I do... (3 Replies)
Discussion started by: solaix14
3 Replies

8. UNIX Desktop Questions & Answers

korn shell script

hi all i am writing the korn shell script. i have a SQL script which gives me the folowing output DSA.WLG.20050713211544.20051025.20050713211544 28991 1130198400 DSA.WLG.20050713211544.20051025.20050713211544 25881 1130198400 DSA.WLG.20050711210100.20051025.20050711210100 25881 ... (3 Replies)
Discussion started by: pavan_test
3 Replies

9. UNIX for Dummies Questions & Answers

korn shell script

hello., i have 2 files.. 1 file is in this folder /home/test/ssk/DSA.WLG.20050713211544.20050710.20050713211544 (this part) other file is in this folder /home/kk/dev/DSA.WLG.20050711210100.20050710.20050711210100 ... (1 Reply)
Discussion started by: pavan_test
1 Replies

10. Shell Programming and Scripting

Problem in korn script

Hi i am facing this problem, please help me in my korn script ------------------------------------------------------------- export $job_ids echo "#Message creation" >message-typing.typ chmod 777 message-typing.typ echo "orderParser:1:999:210:T" >>message-typing.typ echo... (9 Replies)
Discussion started by: pallavimahajan
9 Replies
Login or Register to Ask a Question