Shell Script Interview Questions
Questions Answers Views Company eMail

In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?

632

How do we delete all blank lines in a file?

566

How can we find the process name from its process id?

697

How will I insert a line "abcdef" at every 100th line of a file?

2 5478

How will you copy a file from one machine to other?

538

What is gui scripting?

595

What is the syntax of "nested if statement" in shell scripting?

620

Is it possible to substitute "ls" command in the place of "echo" command?

609

What are the various stages of a linux process it passes through?

620

What is the use of "$#" in shell scripting?

546

Why is the use of shell script?

533

What are the different types of variables used in shell script?

543

What is the use of break command?

577

What are the zombie processes?

559

What are the advantages of shell scripting?

578


Post New Shell Script Questions

Un-Answered Questions { Shell Script }

How to set an array in linux?

579


What is the difference between break and continue commands?

562


What are the disadvantages of shell scripting?

628


What does $@ mean in shell?

588


What is a shell script? Can you name some of its advantages?

518






How do you debug a script?

556


How do I save a powershell script?

551


What lives in a shell?

528


How would you compare the strings in a shell script?

538


What is the fastest scripting language?

543


Write a shell script that adds two numbers if provided as the command line argument and if the two numbers are not entered throws an error message.

789


What are types of shells?

535


Explain about echo command?

617


How will you find the 99th line of a file using only tail and head command?

1966


How to print all array elements and their respective indexes?

499