Requirement


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Requirement
# 1  
Old 05-05-2009
Requirement

I am trying to script and came up with a conclusion that I need a do while loop in my statement. I am stuck with the
do while syntax. I need to use it alongwith the if then else statement. Can I use it is a big question? I actually need to get all the files
that are there from within run_dt to load_dt with the loop.
I hardly use unix can somebody help plz.
I will tell u the requirement.

I am using
load_dt=20090503
run_dt=20090506
diff=load_dt-run_dt
if $load_dt=$run_dt
then get the run_dt file
or else if $load_dt!=$run_dt
then
create a do while loop [ I need to use loop because there a large no. of files] to find the files which are we missed
cp those files
exit

Thanks in advance
# 2  
Old 05-06-2009
Have a read of some scripting tutorials:

https://www.unix.com/answers-frequent...tutorials.html

A link found with Google for conditionals and loops:

Ksh basics
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

UNIX requirement

Hi Everyone, Can anyone of you help me on how to get files creation time on ftp server/Remote server in unix. Regards, Avinash. (6 Replies)
Discussion started by: Avinash varma
6 Replies

2. UNIX for Dummies Questions & Answers

Script requirement

Please help in creating script for below requirement. I will be running 1 command and will get below entries in a text file say file44.txt ******************************* DFDL1005 06:30 00:05 ABFL2003 10/22 01:10 CFTL1256 10/24 00:10 10/25 09:20 PM ******************************** .... (3 Replies)
Discussion started by: Vinay_3308
3 Replies

3. Shell Programming and Scripting

UNIX - requirement

Hi All, I have a source file with data Name ~ Groups Muni~abc,was,USA_ax,123 Chaitanya~USA_12,was Balaji~123,xyz,was Ramu~123,xyz From the second column i want to extract only the groups that matches the pattern 'USA_%' or if the group = 'was', and ignore any other columns. ... (8 Replies)
Discussion started by: morbid_angel
8 Replies

4. Shell Programming and Scripting

Looping requirement

Hi all, I have little working knowledge in unix shell scripting. I have a requirement where i need to pull out some data in between the strings in the file. Input: TEST a a c f d TEST f e g g TEST Output: (7 Replies)
Discussion started by: satyasrin82
7 Replies

5. Shell Programming and Scripting

complex requirement

i have a requirement to search a pattern1 and once the pattern1 is found i have to go up and search pattern2 and if pattern2 is found i have to search down for pattern3 and pattern4. once this cycle is compelted, again i have to search pattern1 and pattern2,3,4 i am able to do this by opening... (9 Replies)
Discussion started by: tnvanathy23
9 Replies

6. Shell Programming and Scripting

Weird requirement using egrep

Hi, I have a weird requirement using egrep. I'm using egrep -o 'x.*|y.*' to a file. Since egrep returns the value if either of the 1 satisfies. But in my file both the conditions are satisfied (x and y) and hence I want to return twice using this command. Is there any way around? I don't... (11 Replies)
Discussion started by: shri_ankur
11 Replies

7. Shell Programming and Scripting

URGENT REQUIREMENT

1.Write an automated shell program(s) that can create, monitor the log files and report the issues for matching pattern. (i) Conditions for creating log files. Log file is created with date (example 2010_03_27.log). If the log file size is 10 Mb for a particular day then automatically the log... (3 Replies)
Discussion started by: praveen12
3 Replies

8. AIX

SPOT requirement

Hey May be a dumb question Can I use a SPOT which is at 5.3 TL6 to boot an LPAR (with 5.3 TL8) in to maintenance mode? Will it work ? Is it mandatory that SPOT should be of same or higher version in such case? Bala (1 Reply)
Discussion started by: balaji_prk
1 Replies
Login or Register to Ask a Question