Sponsored Content
Top Forums Shell Programming and Scripting Problem with while loop in shell script Post 302219554 by D1nesh on Tuesday 29th of July 2008 12:34:05 PM
Old 07-29-2008
You need to have a carriage return after the last line. vi the file and press 'enter' at the end of last line and save. They retry your code and it should work.

Cheers,
Dinesh
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script loop problem

I am writing a shell script that simulates the `wc -w` command without actually using wc itself. My problem is that the script will only read the first line of the file and just keep looping through it. I have tried both while and for loops and got the same result. Can anyone help? ... (1 Reply)
Discussion started by: MaxMouse
1 Replies

2. Shell Programming and Scripting

for loop problem in K shell

I want to echo from 1 to 100 using a for loop. I was trying out all possible syntax using for loop, but it errors out. can you help me in doing this? I was using for i in 1..100 do echo $i done Regards Asutoshch (4 Replies)
Discussion started by: asutoshch
4 Replies

3. Solaris

Problem in for loop of shell scripting in solaris

Hi below is my script for((i=0;i<=$TOTAL;i++)) do echo "IP's created are $s1.$s2.$s3.$s4" s4=`expr $s4 + 1` done where s1,2,3,4 are input varibles below error occurs while running the script syntax error at lin 11: '(' unexpected ... (12 Replies)
Discussion started by: krevathi1912
12 Replies

4. Shell Programming and Scripting

if loop problem in bourne shell

how to use if-loop in bourne shell with multiple conditions like follows if then commands fi it gives me an error test: ] missing then i put if ] it gives me an error [[ not found kindly i need the syntex for the bourne shell (5 Replies)
Discussion started by: ahmad.diab
5 Replies

5. Shell Programming and Scripting

problem in while loop in a script

i have a script that will read each line and then grep a particular pattern and do some_stuff. Below the script while read j do q1=0 q1=`$j | grep 'INFO - LPBatch:' | wc -l` if then $j | tr -s " " | cut -d " " -f8,42,43 >> nav1.txt fi q2=0 q2=`$j | grep 'INFO - Number of Intervals... (12 Replies)
Discussion started by: ali560045
12 Replies

6. Shell Programming and Scripting

problem with while loop in BASH shell

I have file named script1 as follows: #!/bin/bash count="0" echo "hello" echo "$count" while do echo "$count" count=`expr $count + 1` done ----------- when I run it, I get ./script1: line 9: syntax error near unexpected token `done' ./script1: line 9: `done' I... (6 Replies)
Discussion started by: npatwardhan
6 Replies

7. Shell Programming and Scripting

while loop problem in c shell script

Hi all, i write a script c shell set i = 1 while ( $i <= $#array ) echo "$array" @ i++ end i want to set it to i = i +2 in that statement . Can anybody help me? ---------- Post updated at 02:46 PM ---------- Previous update was at 02:35 PM ---------- anybody not how to solve it??? (2 Replies)
Discussion started by: proghack
2 Replies

8. Shell Programming and Scripting

loop problem in c shell

Hi all, i got problem with this statement. I use 2 time loop while in 1 statement . But it excetu at second loop while. I want it continue loop until it stop when wrong. Plz help me -- #!/bin/csh set app_dir = "/ebsxe/ebs25/users/mmlim/assignment01" set line_array = (`cat... (0 Replies)
Discussion started by: proghack
0 Replies

9. UNIX for Dummies Questions & Answers

C shell loop problem occur

Hi all, i create 2 file Config path1 5 group1 path2 6 group2 path3 10 group1 path4 15 group2 Confine group1 andrew group2 alan In my C shell script i write like this: set line_array = (`cat $app_dir/config`) set line_array_2 =... (0 Replies)
Discussion started by: proghack
0 Replies

10. Shell Programming and Scripting

Bourne Shell - Problem with while loop variable scope.

Hello I am having issues with a script I'm working on developing on a Solaris machine. The script is intended to find out how many times a particular user (by given userid) has logged into the local system for more than one hour today. Here is my while loop: last $user | grep -v 'sshd'... (7 Replies)
Discussion started by: DaveRich
7 Replies
uugetty(1M)															       uugetty(1M)

NAME
uugetty - set terminal type, modes, speed and line discipline SYNOPSIS
timeout] line [speed [type [linedisc]]] file DESCRIPTION
The commands, including are targeted for removal from HP-UX; see the below. sets terminal type, modes, speed and line discipline. It is similar to except that supports using the line in both directions (see getty(1M)). This allows users to log in, but, if the line is free, and can dial out (see uucico(1), cu(1), and ct(1)). When devices are used with and lock files are created. Therefore, when the call to returns (see open(2)) (or the first character is read when the option is used), the status of the lock files indicates whether the line is used by or someone trying to log in. See getty(1M) for more information. Note that with the option, several carriage-return characters might be required before the login message is output. When is trying to log in, it can be instructed to enter numerous carriage-return characters with the following login script: where ... represents whatever would normally be used for the login sequence. An entry for an intelligent modem or direct line that has a on each end must use the option (this causes uugetty to wait to read a charac- ter before it enters the login message, thus preventing two instances of from looping). If there is a on one end of a direct line, there must be a on the other end as well. EXAMPLES
The following line is an entry using on an intelligent modem or direct line: WARNINGS
Use of commands, including is discouraged because they are targeted for removal from HP-UX. Use ftp(1) or rcp(1) instead. does not work when is used with an intelligent modem such as a Penril or a Ventel. FILES
SEE ALSO
ct(1), cu(1), login(1), uucico(1M), getty(1M), init(1M), ioctl(2), gettydefs(4), inittab(4), tty(7). Tim O'Reilly and Grace Todino, O'Reilly & Associates, Inc. USA. Grace Todino and Dale Dougherty, O'Reilly & Associates, Inc. USA. TO BE OBSOLETED uugetty(1M)
All times are GMT -4. The time now is 07:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy