[Solved] help me in this looping in shell scripting


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting [Solved] help me in this looping in shell scripting
# 1  
Old 10-05-2010
[Solved] help me in this looping in shell scripting

Hi,
Code:
 
#!/bin/ksh
result='/TIA/app/UniQP/queue/document/CSB'
i=0;
 
 
while [ $result="0000" ] ;
        do
                i=`expr $i + 1`
                if ($i -lt 5);then
                        echo "THerrFile_$i.err";
                else
                        break;
                fi
done

this code is erroring out.

Please

---------- Post updated at 10:08 AM ---------- Previous update was at 09:54 AM ----------

hi,

THe issue is resolved.

Thanks

Last edited by vbe; 10-05-2010 at 12:14 PM.. Reason: code tags please - Howto in Additional helpful guidelines of forum rules.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell scripting looping issue

#!bin/ksh --------------------------------------------------------------------------------------------- -- Get sequence number from database --------------------------------------------------------------------------------------------- .os rm... (3 Replies)
Discussion started by: swathi reddy1
3 Replies

2. UNIX for Dummies Questions & Answers

[Solved] Need help understanding ksh scripting.

Can any one please tell me where the error in below script. Output is not as per my requirement. if condition not comparing the result of record count of a file with 1. where is the pbm in my script? Appreciate your help.. #!/bin/ksh #Module- #Summary- To move the file to direcotries if... (9 Replies)
Discussion started by: shivadanam
9 Replies

3. Shell Programming and Scripting

[Solved] Shell scripting

I am new to write scripts. I want help to write a shell script to create 10 users and passwords to users. Can any please help me. (9 Replies)
Discussion started by: DONFOX
9 Replies

4. Shell Programming and Scripting

Help with looping in shell scripting

Hi there im totally new to shell scripting and i find it very interesting. I come from java programming background. Basically what i need is to loop a string of say all possible permutations of 20 displayable characters and md5 hash the string till it produces a 128 bit hash value with say 4... (17 Replies)
Discussion started by: jremio
17 Replies

5. Shell Programming and Scripting

[Solved] Looping var from two files

Hey Guys, I have been searching but unable to find solution for this; Got 2 files: #File A A B C #File B 1 2 3 And would like to 'merge' file and get a out put like; A1 A2 A3 B1 (2 Replies)
Discussion started by: bsdguy
2 Replies

6. Shell Programming and Scripting

[Solved] looping script issue

Hi all.. Need your help I want to combine 2 file into 1file File1 : A B C D File2 : 1 2 3 4 Result : A1 A2 A3 A4 B1 (3 Replies)
Discussion started by: buncit8
3 Replies

7. Shell Programming and Scripting

[SOLVED] Book for shell scripting

I plan to buy a shell scripting book. Please suggest me a best book for shell Scripting. It will be great if the book contains more examples. Regards Kalai ---------- Post updated at 01:24 AM ---------- Previous update was at 01:09 AM ---------- I got the solution in the below post. (0 Replies)
Discussion started by: kalpeer
0 Replies

8. Shell Programming and Scripting

[Solved] need help in shell scripting

Hi Friends, Please help me with the following problem: I have a text file with the following lines: Dated: 8/11/2011 <br> Time : 0000 <br> ============== <br> --------------------------------------<br>Data Upload Time =4:51:52... (2 Replies)
Discussion started by: anuajay1988
2 Replies

9. Shell Programming and Scripting

(solved) Shell scripting to access SQLPLUS using variable

I have shell script which will try to login to SQL Plus and retrieve some data, based on the outcome i will proceed further Below is the content of the file pebblz02% cat test1.ksh #! /bin/ksh dummyvar=`sqlplus -S csm_admin/csm_admin@SIDNAME <<EOF echo hi; exit; EOF` Error message on... (0 Replies)
Discussion started by: kiranlalka
0 Replies

10. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies
Login or Register to Ask a Question
shells(4)							   File Formats 							 shells(4)

NAME
shells - shell database SYNOPSIS
/etc/shells DESCRIPTION
The shells file contains a list of the shells on the system. Applications use this file to determine whether a shell is valid. See getuser- shell(3C). For each shell a single line should be present, consisting of the shell's path, relative to root. A hash mark (#) indicates the beginning of a comment; subsequent characters up to the end of the line are not interpreted by the routines which search the file. Blank lines are also ignored. The following default shells are used by utilities: /bin/bash, /bin/csh, /bin/jsh, /bin/ksh, /bin/ksh93, /bin/pfcsh, /bin/pfksh, /bin/pfsh, /bin/sh, /bin/tcsh, /bin/zsh, /sbin/jsh, /sbin/sh, /usr/bin/bash, /usr/bin/csh, /usr/bin/jsh, /usr/bin/ksh, /usr/bin/ksh93, /usr/bin/pfcsh, /usr/bin/pfksh, /usr/bin/pfsh, and /usr/bin/sh, /usr/bin/tcsh, /usr/bin/zsh, and /usr/sfw/bin/zsh. /etc/shells overrides the default list. Invalid shells in /etc/shells could cause unexpected behavior, such as being unable to log in by way of ftp(1). FILES
/etc/shells list of shells on system SEE ALSO
vipw(1B), ftpd(1M), sendmail(1M), getusershell(3C), aliases(4) SunOS 5.11 20 Nov 2007 shells(4)