Sponsored Content
Full Discussion: awk beginners question
Top Forums Shell Programming and Scripting awk beginners question Post 302472015 by svencz on Tuesday 16th of November 2010 03:27:34 AM
Old 11-16-2010
thanks scott,

you are right - i've left out the braces on the command line. the script file also worked after removing them.

i was using braces like in c ... my 1st lesson!

Last edited by svencz; 11-16-2010 at 04:37 AM..
 

8 More Discussions You Might Find Interesting

1. Programming

X-programming for beginners

Good morning. Thanks for the very valuable hard-to-find information I get from you guys. Can anybody give any suggested websites or references for anyone who wants to begin learning on programming applications in X? Thanks to anyone in advance... (1 Reply)
Discussion started by: jfsuminist
1 Replies

2. UNIX Desktop Questions & Answers

unix course for beginners

does anyone know of a course for unix beginners (1 Reply)
Discussion started by: moose
1 Replies

3. Shell Programming and Scripting

awk - Beginners Question

I have my inputfile in the following format : From:sdhfhg dsfhsdjfjdsfh dsfjdjshjsd djfhsdjfjsdhjds Error Description <aa.aa.aa.aa.aa.aa> From:ksljfsdhfjh djfdsjkf sdjwoquk dsfsdfj Error Description <dd.dd.dd.dd.dd> I want to read the lines from tag 'From:' thrul <aa.aa.aa.aa.aa.aa>... (1 Reply)
Discussion started by: Amruta Pitkar
1 Replies

4. UNIX Desktop Questions & Answers

UNIX for beginners

I am new to non Windows operating systems. Does anyone have advice on which UNIX OS vendor would be good for learning purposes. I was looking for a version of UNIX that runs on the Intel platform. Do you have any recommendations on where to purchase the software? Thank you. (14 Replies)
Discussion started by: jmy113437
14 Replies

5. Programming

Beginners question about fork

Hi everyone: I'm developing a dynamic library for notifications, this library is used for a daemon that i've programmed, when something goes wrong the library should send an email to an administrator, but since sending an email is a non-vital process then it can fail (it should work as an... (4 Replies)
Discussion started by: edgarvm
4 Replies

6. Shell Programming and Scripting

Shell program for beginners

Hey, i hope someone can help me with this program. I need to write a program in shell which will return how many times and how much time have users been logged in system between two dates. We give time as 2 dates as arguments in command line. Example: $ nameofprogram 27/04 06/05 ... (1 Reply)
Discussion started by: Exander
1 Replies

7. UNIX for Dummies Questions & Answers

UNIX for beginners

i'm just a beginner in unix environment- please help which book to read and which os to use!!! :confused: seriously i've no idea what is unix or how much capable it is!! (1 Reply)
Discussion started by: gaurav singh
1 Replies

8. UNIX for Dummies Questions & Answers

UNIX ebook for beginners

hi all, Can you suggest me a ebook for unix beginners. I am new to unix. (2 Replies)
Discussion started by: rajasingam
2 Replies
while(3tcl)						       Tcl Built-In Commands						       while(3tcl)

__________________________________________________________________________________________________________________________________________________

NAME
while - Execute script repeatedly as long as a condition is met SYNOPSIS
while test body _________________________________________________________________ DESCRIPTION
The while command evaluates test as an expression (in the same way that expr evaluates its argument). The value of the expression must a proper boolean value; if it is a true value then body is executed by passing it to the Tcl interpreter. Once body has been executed then test is evaluated again, and the process repeats until eventually test evaluates to a false boolean value. Continue commands may be exe- cuted inside body to terminate the current iteration of the loop, and break commands may be executed inside body to cause immediate termi- nation of the while command. The while command always returns an empty string. Note: test should almost always be enclosed in braces. If not, variable substitutions will be made before the while command starts execut- ing, which means that variable changes made by the loop body will not be considered in the expression. This is likely to result in an infinite loop. If test is enclosed in braces, variable substitutions are delayed until the expression is evaluated (before each loop iter- ation), so changes in the variables will be visible. For an example, try the following script with and without the braces around $x<10: set x 0 while {$x<10} { puts "x is $x" incr x } EXAMPLE
Read lines from a channel until we get to the end of the stream, and print them out with a line-number prepended: set lineCount 0 while {[gets $chan line] >= 0} { puts "[incr lineCount]: $line" } SEE ALSO
break(3tcl), continue(3tcl), for(3tcl), foreach(3tcl) KEYWORDS
boolean value, loop, test, while Tcl while(3tcl)
All times are GMT -4. The time now is 07:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy