Solved

Tcsh if statement problem

Posted on 2008-06-19
1
4,025 Views
Last Modified: 2013-12-26
I have this code in my tcsh script:
set i=(pgrep startlotj | wc -l)
if ( "$i" > "1" ) exit 0

It's purpose is to kill the new instance of startlotj if there is already one running. However, I get this error: "if: Expression Syntax."
0
Comment
Question by:JonMarkGo
1 Comment
 
LVL 84

Accepted Solution

by:
ozo earned 125 total points
ID: 21825521
did you mean
set i=`pgrep startlotj | wc -l`
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now