Unable to verify the State of Null in a Shell Script

Hello

When I use to check the Null Condition to check for a running Java process his failure to check.

I use the variable in a shell script

DPID = $(ps-ef | grep-i java | grep-v grep)
If ["$DPID '='" ']; then

on the other


FI

If the DPID is null, then executed obtaining but if the DPID value her not to enter the other part of the loop

Thanks and greetings

You could try - c do grep returns a number of matches, and then check if this counter is zero or not.

DPID=`ps -ef |grep - i java|grep -vc grep`

if [[ $DBID -ne 0 ]]; then 

else

fi

Tags: Database

Similar Questions

  • By updating my IPad IOS 9.3 Air, the following message appears: "unable to verify the update.  9.3 IOS doesn't have a verification because you are no longer connected to the Internet.  New attempt remind Me later

    By updating my IPad IOS 9.3 Air, the following message appears: "unable to verify the update.  9.3 IOS doesn't have a verification because you are no longer connected to the Internet.  New attempt remind Me later. " See the image below.

    Note that while I am able to get the email, do some research on the Internet, etc., that the update itself seems to be the culprit the disconnection of Internet while performing the check.  I closed all applications and even rebooted the IPad and then tried to run the update, but still get the same message.  Any other suggestions?

    Thank you in advance for your help!

    I'm having this problem too.

  • Can not do a screen shot using the command shift 4. Unable to capture the States. I restart the Mac.

    Can not do a screen shot using the command shift 4. Unable to capture the States. I restart the Mac.

    It is to capture a piece of the element you want to screenshot, make a fire using full-screen control + 3

  • It displays "unable to verify the account name or password" in the Mac mailbox after I updated my individual mailbox password

    I have updated my 163 mailbox password and tried to update in the mailbox of the Mac, but when I type the password he showed "unable to verify the account name or the password". What should I do to re-connect to my Mac mailbox account?

    Hello Sara,.

    Thank you for using communities of Apple Support.

    I see that you have trouble with your e-mail account. I suggest the following article to get tips on troubleshooting your e-mail account.

    If you cannot send or receive e-mail on your Mac.

    Best regards.

  • Why it says "we are unable to verify the serial number.

    Hello

    My laptop is MacPro.

    When I type the serial number, it says that we are unable to verify the serial number with the CS6 and Design and Web. What is wrong with him?

    And I really need your help, please!

    I await your response. Thank you very much!!

    HI hanyangzi,

    Please rename the hosts file. Hosts.old hosts and try to activate Adobe applications.

    Kind regards

    Ashish

  • FDMEE: Unable to capture the State of the successful import flag in the afterimport script

    Hello Experts,

    I am facing a problem in the import successful FDMEE shot.

    I have an obligation to send e-mail notifications on import successful and unsuccessful import mentioning status.

    I tried to use variables:

    1 set objProcessStatus = objFDMAPI.API.MaintenanceMgr.fProcessStatus (strLoc, strCat, strPer, strRulID)

    objProcessStatus.blnImp

    The objProcessStatus.blnImp value is always returned as 'false' regardless of the State of importation (successful & unsuccessful both cases)

    2. I tried with objProcessStatus.lngStatus,

    Here also, the returned value is always '0', regardless of the status of the import.

    3. I tried to capture the "PROCESSIMP" of TLOGPROCESS and the value of PROCESSIMP is always 0 even on successful importation.

    While the fish turns Orange Import indicating a successful import.

    Need help in an effective way to capture the flag of the State of import successful.

    Sample code I use to capture the State:

    Dim lngStateCheck

    Dim objProcessStatus

    Dim stat

    strLoc = objFDMAPI.API.State.LocName

    strLocKey = objFDMAPI.API.State.LocKey

    strCat = objFDMAPI.API.State.CatName

    strCatKey = objFDMAPI.API.State.CatKey

    strPer = objFDMAPI.API.State.PeriodKey

    strRulID = objFDMAPI.API.State.RuleID

    WScript.Echo "key location" & strLocKey

    WScript.Echo "ID of the rule" & strRulID

    WScript.Echo "Partition key" & strLocKey

    WScript.Echo strPeriodKey & "period"

    "The value of object process status indicator.

    Set objProcessStatus = objFDMAPI.API.MaintenanceMgr.fProcessStatus (strLoc, strCat, strPer, strRulID)

    Set FSO = CreateObject ("Scripting.FileSystemObject")

    Set FSO = writefile. OpenTextFile("E:\FDMEE\data\scripts\debug.txt",8)

    «I am here and my value is» WriteFile.WriteLine

    WriteFile.WriteLine objProcessStatus.blnImp

    WriteFile.WriteLine objProcessStatus.lngStatus

    WriteFile.Close

    'Destroy objects '.

    objFDMAPI.Dispose

    Set objFDMAPI = Nothing

    ********************************

    Save file entry of PROCESSIMP: (the following query is in the log file indicating that PROCESSIMP is updated as 0)

    2015-09-01 11:15:08, 008 [AIF] DEBUG:

    UPDATE TLOGPROCESS

    SET PROCESSENDTIME = CURRENT_TIMESTAMP

    PROCESSSTATUS = 0

    PROCESSIMP = 0

    PROCESSVAL = 0

    PROCESSEXP = 0

    PROCESSENTLOAD = 0

    PROCESSENTVAL = 0

    BLNWCDIRTY = 0

    BLNLOGICDIRTY = 0

    BLNVALDIRTY = 0

    PROCESSIMPNOTE = NULL

    PROCESSVALNOTE = NULL

    PROCESSEXPNOTE = NULL

    PROCESSENTLOADNOTE = NULL

    PROCESSENTVALNOTE = NULL

    WHERE PARTITIONKEY = 37 AND CATKEY = 1 AND PERIODKEY = ' 2017-01-31' AND RULE_ID = 56

    I tried to print the values of IMPSTATUS in afterimport & befValidate script.

    The value of AfterImport is = 0

    While in BefValidate = 1

    This proves that the value of the indicator of State for IMPSTATUS is changed after the afterimport of script is executed.

    Thanks for your time and your help.

  • "Unable to verify the account name and password" for Facebook! Embarrassing, Apple, embarrassing...

    I changed my password on my Facebook and El Capitan asks me to re - enter the password for my Facebook account settings. I get my password and I am 100% sure that I entered correctly - and again - I get the message:

    "Cannot verify the password and account name"

    I also saw other people having the same problem with Twitter (see cannot verify the password and account name). It's not good at all, and I think seriously about abandoning Apple products because of things like this that should work first and then all the rest. I'll switch to Android, even though I use iPhone and macbook... It's basic stuff, and it does not work. I don't like anything else and I expect something like that to work without any excuse and another opinion on the Apple than Apple flagship operating system working on since decades... wow... so embarrassing and sad...

    This is a user forum. If you need to complain to Apple, use the site to your comments:

    http://www.Apple.com/feedback/

    If you want to help, explain how you are trying to connect to Facebook in El Capitan (such as Safari) with a little more detail and less rant. Someone can help you.

  • Trying to run MS Word (and excel etc) I get error message "Microsoft office home and student 2010 is unable to verify the license for this product...".

    Buy a laptop computer with already installed microsoft 18 months ago. Use the activation key, thought everything was ok but recentley I was getting messages error and cannot find the original activation key. Bought a new 'family pack' office home and student 2010 pack (with disk). Loaded package but error message came back tellingme to remove all microsoft and re - load. Followed by the present instruction, now when I open MS word (or Excel etc) I get the error msg ' microsoft office home & student 2010 can not verify the license for this product. " You will need to repair the office program by using the control panel.

    Can someone explain how I can do this?

    Thank you in anticipation

    Tony

    Run the patch tool mentioned in the article below to uninstall Office 2010:

    http://support.Microsoft.com/kb/290301

    If the step above does not resolve the problem, uninstall Office by removing all the registry keys for this office manually check the item below:

    Note: Read the disclaimer mentioned in this article before you perform the troubleshooting steps.

    Instead of office 12 files looking for records Office 14.

    http://support.Microsoft.com/kb/928218

    See the link on how to convert a trial version of a suite full Office 2010 or program to a commercial version: -.

    http://Office.Microsoft.com/en-us/project-help/convert-a-trial-version-of-an-Office-2010-suite-or-program-to-a-full-retail-version-HA101886436.aspx

    http://Office.Microsoft.com/en-us/buy/convert-your-trial-to-a-full-product-version-HA101812668.aspx?CTT=1

  • Unable to display the State of the material.

    Hi all

    Using esxi 4.1 with vcenter 5.0, but when I click on each host and go to the State of the material I couldn't see anything. the message I get there

    "No new available given host. Data will be updated in 5 minutes"

    even after 5 minutes, nothing happens, I refreshed this page, clicked on update nothing happens.

    After searching on Google, I came to the link below. What status you must have the permissions. But here, I have the full privileges, am the vcenter administrator and host.

    http://KB.VMware.com/selfservice/microsites/search.do?language=en_US & cmd = displayKC & externalId = 1035457

    http://KB.VMware.com/selfservice/microsites/search.do?cmd=displayKC & docType = kc & externalId = 1030536 & sliceId = 1 & docTypeID = DT_KB_1_1 & dialogID = 268874248 & StateID = 0% 200% 20254100776

    One fell on it, please help in this regard, I need to monitor and check the hardware of the server also know if any material questions.

    Concerning

    Riadh Gunnal

    Guys, I found the solution. At least it works for me. I don't remember the website, but it was half correct, it lacked a single step.

    1 stop the vCenter inventory service

    2 - remove all the contents of C:\Program Files\VMware\Infrastructure\Inventory Service\data

    3 - go to C:\Program Files\VMware\Infrastructure\Inventory Service\scripts\ and run createDB.bat

    4 - run register.bat with your server name. FQDN Register.bat 443

    5 start the vCenter inventory service.

    And that's all!

    My environment: VCenter 5 update vCenter 4.1. Same host, same name.

  • Why the sql statement was extucted twice in shell script?

    I tried to test the rac load balancing using the shell script depending on suse 10 + oracle 10g rac.
    oracle@SZDB:~> more load_balance.sh
    #!/bin/bash
    for i in {1..20}
    do
    echo $i
    sqlplus -S system/oracle@ORA10G <<EOF
    select instance_name from v\$instance;
    /
    EOF
    sleep 1
    done
    exit 0
    After run the shell script, I got the result to follow.
    oracle@SZDB:~> ./load_balance.sh
    1
    
    INSTANCE_NAME
    ----------------
    ora10g2
    
    INSTANCE_NAME
    ----------------
    ora10g2
    
    2
    
    INSTANCE_NAME
    ----------------
    ora10g1
    
    INSTANCE_NAME
    ----------------
    ora10g1
    
    3
    
    INSTANCE_NAME
    ----------------
    ora10g1
    
    INSTANCE_NAME
    ----------------
    ora10g1
    Seem that the sql statement was run twice in each loop. If you help please take a look. Thanks in advance.

    Robinson

    Because you have one; and one.

  • How2 validate the chain of connection in unix shell script

    I am writing a shell script unix which removes the instance user/passwd/user, form a connection string and pass it to sqlplus. Now, I want to validate if a valid/clean connection string was formed. Basically, I want to do something like below

    sqlplus-s $CONN_STR

    and disconnect if valid string and always disconnect and return to guest if it's not a string valid.

    Is there a clean way, I can check if the return has been after a successful login and how disconnect it in script and check if a string is not valid.

    Create a file name test.sql containing only the OUTPUT and use-L option to SQL * more (attempts to connect only once, instead of reprompting error.)

    D:\>sqlplus -L hr/ko@XE @test.sql
    
    SQL*Plus: Release 11.1.0.6.0 - Production on Wed Feb 17 08:48:37 2010
    
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    
    ERROR:
    ORA-01017: invalid username/password; logon denied
    
    SP2-0751: Unable to connect to Oracle.  Exiting SQL*Plus
    
    D:\>echo %errorlevel%
    1
    
    D:\>sqlplus -L hr/hr@XE @test.sql
    
    SQL*Plus: Release 11.1.0.6.0 - Production on Wed Feb 17 08:48:49 2010
    
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    
    Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    
    D:\>echo %errorlevel%
    0
    
    D:\>sqlplus -L hr/hr@KO @test.sql
    
    SQL*Plus: Release 11.1.0.6.0 - Production on Wed Feb 17 08:52:22 2010
    
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    
    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified
    
    SP2-0751: Unable to connect to Oracle.  Exiting SQL*Plus
    D:\>echo %errorlevel%
    1
    
  • Get the progress and result of a shell script

    Hello

    I would use a shell script to convert MP3 / audio FLAC files MP3 files with a bitrate of 192kbs and do other things in Automator or AppleScript script.

    So I installed lame and flac with brew, run an Automator process with a selected file and perform an action of AppleScrip:

    on run {input, parameters}
    
      if input is not {} then
    
      repeat with theFile in input
    
      set posix_file to POSIX path of theFile
    
      if input is not {} then
    
      tell application "Terminal"
    
      set thescript to "/usr/local/bin/lame -b 192 \"" & posix_file & "\" "
    
      do script thescript
    
      end tell
    
      end if
    
      end repeat
    
      end if
    
      return input
    
    end run
    

    The Terminal window is there because you tell the Terminal to run your script - try using shell script.

  • HP Slatebook 14 could not be updated: E: unable to verify the signature of the whole file

    Follow-up of the update procedure (http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?os=4153&lc=nl&cc=nl&dlc=nl&sw_lang=&product=7264... to update my Slatebook 14-P010nd of version 4.3 - 17R21-14-14 at the 2014-07-10, Versie4.3 - 17R21-15-15, 397.69 version M and got the following error message:)

    Android recovery system<3e>

    Product model: HP Slatebook 14 PC

    Serial number: [thank you for visiting the Forums from HP Support. I'm sorry to inform you that your message needs some changes to remove personal information].

    Bootloader Version: F.04

    KBC Version: Rev54.07

    Recovery Version image: 200 a - r03

    BSP Version: 17r21

    -Install /sdcard...

    Finding update package...

    Open the update package...

    Verifying Update package...

    E: impossible to verify whole-file signature

    E: air signature failed

    Installation abandoned

    Hi TwoPointOh,

    This morning the updated build 4.3 - 17R21-15-15 were made automatically (message above on the left) Android.

    I had to accept the update, and it went well. I checked the version number in the settings.

    Problem solved!

  • Is there a way to personally verify the State of the battery on my 4 gen iPad without going to the Apple Store?

    Check battery spent personally with my iPad at the Apple Store 4gen?

    Two ways

    You can chat with Apple and they can run a diagnostic remote test

    OR you can go to the App store and search for an app that will do it for you.

  • I xp2000 media edition spk 3 IE 7. I get rejected on the updates saying not loaded. 7 so far. until the message I see is unable to read the statement to the 0x76c941a9 location. a reference could not be found for this problem on the microsoft system.

    Help, please

    Hi gsduhn

    Welcome to the Microsoft Answers Forum!

    I recommend that first of all uninstall Internet explorer 7 on your computer. Follow the steps listed below in the link uninstall: http://support.microsoft.com/kb/927177

    Then reset windows update components, then try to install the updates, check if the problem is resolved. It has Fix tool link below will help you with the same

    How to reset the Windows Update components: http://support.microsoft.com/kb/971058

    Once the rest is complete install internet explorer 7 manually from the link below:

    http://www.Microsoft.com/downloads/details.aspx?FamilyId=9AE91EBE-3385-447C-8A30-081805B2F90B&displaylang=en

    And install the update to the clean boot. To help resolve the error and other messages, you can start Windows Vista by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    How to run check and clean boot if you have the problem.

    i. click Start, click run, type msconfigand click OK.

    II. the System Configuration utility dialog box appears.

    III. in the System Configuration utility dialog box, click the general tab and then click Selective startup.

    IV. Click to uncheck the Process SYSTEM. INI file check.

    v. Click to uncheck the process to WIN. INI file check.

    VI. Click to clear the Load Startup items check box. Check The Load System Services and to use Original BOOT. INI are checked.

    VII. click on the Services tab.

    VIII. Click to select the hide all Microsoft Services check box.

    IX. click disable all, and then click OK.

    x when you are prompted, click restart to restart the computer.

    XI. install the stand alone update.

    Reset the computer to start as usual

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:

    i. Click Start, type msconfig.exe in the start search box and press ENTER.

    II. If you are prompted for an administrator password or for confirmation, type your password, or click on continue.

    III. on the general tab, click the Normal startup option and then click OK.

    IV. When you are prompted to restart the computer, click on restart.

    Here is the link for the same thing: http://support.microsoft.com/default.aspx/kb/310353

    Thank you, and in what concerns:

    Samhrutha G S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for