MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

Shell Bash Scripting Interview Questions and Answer – Part 3

  1. How can I print shell script name?
  2. How to write a script when the first command is executed then execute the below script?
  3. Can you tell me the syntax for for loop and while loop?
  4. How to print shell name?
  5. How to assign a all the arguments to a single variable?
  6. How to print the current processid of current shell?
  7. How to know the file that is entering randomly to my script?
  8. How to divide two variables in shell script?
  9. What is trap?
  10. What is shift in shell script?
  11. How to run our script in background?
  12. How to know the running back ground process id ?
  13. What is $*, $$ and $@?
  14. How to print only directories?
  15. How to print the directory only started with number?
  16. How to grep two strings at a time?
  17. How to grep a string that is started with some string and ends with some string like a…..b ?
  18. How to print string that starts with a?
  19. Did you worked on arrays?
  20. How will you give access of your script to a particular user?
  21. How to access background running scripts and their pid?
  22. How to run our script in foreground?

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Shell Bash Scripting: Assignment & Excercise – 7

This exercise uses Bash, rsync and SSH to copy a local file to a remote backup server, then sends an email when the copy finishes. Below the…

Read More

Shell Bash Scripting: Assignment & Excercise – 4

This exercise asks for a Bash script that checks CPU usage and sends an email when it goes over a threshold. The script above reads /proc/stat, but…

Read More

Shell Scripting Tutorials: Function

A Bash function is a named block of commands that takes arguments as $1, $2, … and $@, and hands results back through its output or its…

Read More

Shell Scripting Tutorials: Looping & Iteration statatement using for until

An until loop in shell scripting keeps running its body for as long as a test command fails (returns a non-zero exit status), and stops as soon…

Read More

Shell Bash Scripting: Assignment & Excercise – 3

The script above prints a quick health report for a Linux server: uptime, logged-in users, recent logins, disk and memory use, OOM killer events, the busiest processes,…

Read More

Linux Commands and Shell Scripting Reference for Linux Admins and DevOps Engineers

A structured Linux command and shell scripting reference for operations and DevOps work, rebuilt from the original link collection. It includes a practical learning workflow, command comparison tables, ready-to-use examples, and curated source links.

Read More