Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] bash question
- Date: Mon, 17 Feb 2003 21:06:15 +0900
- From: Jean-Christian Imbeault <jc@example.com>
- Subject: [tlug] bash question
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01
I can't seem to find the proper bash syntax for this simple thing. #!/bin/sh procs=`ps -aux | wc -l` if ($procs > 400) then echo "You have more than 400 procs running" fi If I run this I get: # ./t.sh ./t.sh: 468: command not found $procs is being interpreted as a command instead of an argument ... what is the proper bash syntax to get a comparison done? I've also tried: if [ $proc -gt 400 ] then echo "You have more than 400 procs running" fi but that throws a: ./t.sh: line 5: syntax error near unexpected token `fi' ./t.sh: line 5: `fi' Thanks, Jc
- Follow-Ups:
- Re: [tlug] bash question
- From: Godwin Stewart
- Re: [tlug] bash question
- From: Mike Gauthier
- Re: [tlug] bash question
- From: bruno raoult
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] im-ja: A Japanese input module for GTK2
- Next by Date: Re: [tlug] bash question
- Previous by thread: Re: [tlug] Spambayes in Linux Journal
- Next by thread: Re: [tlug] bash question
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links