Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

315
Views
Check for hsqldb process is failling

I am developing a shell script that checks whether HSQL database is running or not on Ubuntu 20.04 platfrom. So I am attaching the script. This script checks for the process with name HSQL. If the number of process including the 'ps -ef' command is 1 then there is no HSQL running. But while running the script it is always going to if block in all condition, not going to else block at all. Where am I going wrong? Could someone help?

Here is the script:

#!/bin/sh
export  noOfProcess=`ps -ef|grep hsqldb |wc| head -n1 | awk '{print $1;}'`
#echo ${noOfProcess}
 if [ ${noOfProcess}=1 ]
then
 echo 'database is not running'
 /home/priyatosh/test/hsqldb/hsqldb-2.5.0/hsqldb/runjsqldb.sh
else
  echo  'database is already running'
fi
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Please provide a space near equal to sign. So make it if [ ${noOfProcess} = 1 ]

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!