Shell Script Interview Questions

Write a shell script to look at the log file to see if the test has passed or not

defination of mapfile in winrunner?

what do u mean by $#,$* in unix programming?

Is SSO and SSL support BOXI?

how to predefind no. of selected rows from a text file.

Script S1 (which copies .dat files from one directory1 to another directory2) run continuously. Write Script S2 which kills S1 first, compresses all .dat files in directory1 and directory2 successfully, re-run Script S1 and stops self i.e. S2.

What’s the definitions for shell utility and filter?

Write the Script to zip the files that generates automatically every few minutes (files generated are in .arc extension ?

How do you print the output the same string which is typed in command line. how do you write the shell script or command for this. if i entered “Hello” in command line, it should print ‘Hello’, if i say “Hello Welcome”, i should get the “Hello Welcome” as output.?

how to delete all the files with extension .dat rom a directory tree from root to third level in a single unix command?

how to create purchase order

How to enable the shell to know what program should be run to interpret the script?

What is the use of script interpreter in shell scripting?

How to group the commands in shell scripting?

In shell scripting if text is surrounded by single quotes what does it denotes?

What is the syntax of “expr” command?

Create a bash shell script to sort and then uniq the file from the command line & store it to a new file and output the results to the screen. Name this script “sortAndUniq.sh”

Create a bash shell script that removes all files whose names end with a “~” from your home directory and subdirectories. Name this script “cleanup.sh”

What are the additional egrep symbols?

What is egrep?

What is the syntax of “grep” command?

What is the use of “shift” command in passing parameters?

How to declare functions in unix shell script?

What is “test”? How it is used in shell scripting?

What is the need of including script interpreter in your shell script?

How to include comments in your shell scripts?

what are special characters and explain how does text varies by the usage of single quotes,double quotes and back quotes?

What are the different methods available to run a shell script?

How to take input values from the user?

How to print some text on to the screen?

What are the different shells available?

How to modify the PATH variable and make it executable?

whta is the use of “exec” command?

When we login into our account which files are executed?

In which variable prompt value is stored?

What is Path variable?What is its use?

How to make userdefined variables to available for all other shells?

How to create environment variables?What are the conditions for creating variables?

How to change our default shell?

What are the advantages of bash over all other shells?

What are environment variables?

How to customise the other shell?

What is the difference between a variable and value?

How to customise the existing shell?

How will you list only the empty lines in a file (using grep)?

How would you print just the 25th line in a file using smallest shell script?

When you login to a c shell, which script would be run first?

How would you replace the n character in a file with some xyz?

How do you read arguments in a shell program – $1, $2 ..?

What are the different kinds of loops available in shell script?

How do you schedule a command to run at 4:00 every morning?

What is MUTEX?

What is the difference between a shell variable that is exported and the one that is not exported?

If you have a string “one two three”, which shell command would you use to extract the strings?

What does $# stand for?

What are the Different types of shells?

What is the difference between a ‘thread’ and a ‘process’?

What is INODE?

write a shell script to identify the given string is palindrome or not?

How Connect to a Database in Shell Programming?

what is this line in the shell script do ?#!/bin/ksh

What is use of “cut” command?

What is the basic difference you find between a shell script and perl?

what is the difference between writing code in shell and editor?

What are the three main forms of enabling debugging in a shell script?

1 Response to "Shell Script Interview Questions"

  1. Anonymous says:

    Hi

    I read this post 2 times. It is very useful.

    Pls try to keep posting.

    Let me show other source that may be good for community.

    Source: Warehouse interview questions

    Best regards
    Jonathan.

Post a Comment

Powered by Blogger