Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

please give me the solution for shell script

Write shell script for the following task

  1. Change to /disk1/kafka directory
  2. Check if there exists file ‘my.pid’ is present
  3. Output ‘pid file not found’ if file is not present
  4. If the file is present, get contents of this file which will be a PID
  5. Check if any process if running with this PID
  6. Output ‘kafka is running with $PID’ if found
  7. Output ‘kafka is not running with $PID’ if not found

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

How about a list of PowerShell commands for you to research and then you can put this together as a script – come back with more questions if you don’t get it working:

  1. Set-Location or its common alias cd
  2. Test-Path
  3. Write-Host, Write-Error, Write-Warning, Write-Output
  4. Get-Content
  5. Get-Process
  6. See 3.
  7. See 3.
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading