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

Answer Posted / sujitha

3 ways

1. Execute Shell Script using File name

$./scriptfile { The changes in the script effect to current
terminal }

2 . Execute Shell Script by specifying the interpreter

$sh scriptfile

3. Execute Shell script using ../ (dot space dot slash)

$. ./scriptfile { The changes in the script effect to total
system }

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ms powershell?

798


What is a shell script in windows?

801


How do I run a powershell script?

813


Give some situations where typing error can destroy a program?

953


Explain about gui scripting?

860


How will you emulate wc –l using awk?

1245


Explain about shebang?

831


What is sh in shell script?

782


How do you know which shell I am using?

804


What is console line?

767


Given a file find the count of lines containing the word "abc".

1290


shell script for reverse the string

1112


How do I read a .sh file?

774


What is the command to find out users on the system?

769


What language is used in terminal?

753