While loop in tcsh
- From: Melvin <whereismelvin@xxxxxxxxx>
- Date: Thu, 21 Jan 2010 22:48:52 -0800 (PST)
Hi,
I was trying to code a simple while loop in tcsh shell.
#!/bin/tcsh
set cnt=5
while ($cnt > 0)
cnt = $cnt(`expr($cnt - 1))
end
However I am getting the following error :
cnt=4: command not found (Error is going on till <ctrl+c> is pressed.
Is this an error with the syntax?
Thanks
Unix baby
.
- Follow-Ups:
- Re: While loop in tcsh
- From: Ed Morton
- Re: While loop in tcsh
- From: Maxwell Lol
- Re: While loop in tcsh
- From: Barry Margolin
- Re: While loop in tcsh
- From: Rakesh Sharma
- Re: While loop in tcsh
- From: Sidney Lambe
- Re: While loop in tcsh
- From: Bit Twister
- Re: While loop in tcsh
- Prev by Date: Re: pipe and 'read' oddity
- Next by Date: Re: While loop in tcsh
- Previous by thread: In the Bible: the foreign women are prostitutes, crooked, evil, unfaithful, robbers etc
- Next by thread: Re: While loop in tcsh
- Index(es):
Relevant Pages
|