Interview questions

Shell Script interview questions

134 questions. Tap “Show answer” to check yourself.

  1. What is the difference between sh & bash shell?

  2. Please give me example of " at command , contrab command " how to use

  3. How to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?

  4. RAM one table colums a1,a2,a3,a4 respective values 2,4,7,8 KRISH one table colums a1,a2,a3,a4 respective values 3,4,6,9 IN RAM & KRISH a4 column if comparing values RAM A4 - KRISH A4 ( 8-9 =1 THEN print 5 or (RAM) a4 value 10 KRISH a4 values 2 then 10 -2 =8 print 5*8=40 or diff 5 print same

  5. i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff

  6. Hi, I want to practise Unix korn shell scripting which i learnt 2 yr bfr. plz suggest software i can use to practise.

  7. How to separate the even and odd number generated from one file to two separate file i.e. even numbers in file1.txt and odd numbers in file2.txt

  8. How to find weblogic version through linux cammand

  9. What is info area how many types?

  10. Write a scwipt that a) takes exactly one argument, a directory name. b) if the number of argument is more or less than one,print a usage message c) if the argument is not adirectory, print another message d) for the given directory, print the five biggest files and the five files that were most recently modified. e) save the output to a file called q2output.

  11. What is the difference between running a script as ./scriptname.sh and sh scriptname.sh

  12. Set up a Sev 2 alert when the Primary WA service fails. A windows batch script needs to be created that will monitor the WA service on the Primary and when the service stops/fails a Sev 2 TT is generated for a particular team ?

  13. What is tickets $ what low,medium,high priorite pls define time also

  14. Hi All, Is it possible to create one file name only space or space in file name in UNIX and we can able to run that on Unix?

  15. In a file , how to retrieve the lines which are the multiples of 50 ? like 50,100,150th lines etc.

  16. if i have 2 files file1 and file2... file1 contains 2 columns like b a 11 aa 12 as 13 ad 15 ag 11 ar 13 ah 15 ak file2 contains b c 10 ds 11 at 15 gh 15 jk 13 iu 11 fg 13 yy can any 1 give me the program to display in this way? a b c aa 11 at ar 11 fg ad 13 iu ah 13 yy ag 15 gh ak 15 jk

  17. Create a bash shell script that reads a line from the user consisting of 5 words and then prints them out in reverse order. Name this script "reverse.sh"

  18. Create a bash shell script that reads in a number from the user. If the number is 1, print out the date. If the number is 2, list the files in the current directory. If the number is 3, print out who is currently logged onto the system. If the number is anything else, print out an error message and exit. Name this script "various.sh"

  19. Hi, all Scripting professional. Q. I have written script1.sh and calling script2.sh in script1.sh file using bash shell as interpreter and my log in shell also bash shell.My code like Script1 #!/bin/bash echo "My script2 call" . script2.sh Here script2.sh file run successfully but when I have changed my interpreter bash to ksh like #!/bin/ksh Error are comming script2.sh command not found. Guid me how to call other script in our main script.

  20. What are the 4 basics of OOP?

  21. How to sort a result of Ls -l command based on columns. Ex. i want to sort 5th column from output of ls -l command.

  22. madhar chod unix ke 10 commands dhang se likh nahi sakta hai

  23. 1.Write a script, which converts a number from binary to hexadecimal format or vice versa.

  24. Is this growing field and what is average package in this?

  25. In a single command how do you run the previous command in the command prompt.

  26. Please anyone suggest atleast 2 good training institutes in Hyderabad, INDIA where i can learn unix shell scripting.

  27. Where cron file kept?

  28. How to know that your remote server is ruing smoothly or not in unix?

  29. Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.

  30. Hello all, This is my assignment on shell scripting, can anyone help me regarding this ? Create a shell script which connects to the database In second shell script include the first script for the DB connection Create a table (PRADEEP_DATA) with 2 columns (name, value) In Third shell script include the first script for the DB connection And insert/delete the values from the Table, by accepting input from the user This functionality should be a menu driven Program: 1) Insert to the database a. Name b. value 2)Delete from the database a.Name b.value Exception handling needs to be taken care.

Companies that ask Shell Script questions