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

Write a shell script to get current date, time, user name and current working directory.

847


Why are shell scripts used?

816


What is the command to find out today's date?

848


how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com

2351


How to redirect both standard output and standard error to the same location?

901


How to set an array in linux?

793


What is the lifespan of a variable inside a shell script?

1356


Write the syntax for "if" conditionals in linux?

802


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

3830


How to find all the files modified in less than 3 days and save the record in a text file?

837


What can you do with powershell?

812


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.

1026


What is wc in shell script?

740


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 <5 the 5 3)Qes diff 5 then 5 print respective values..

1957


What is option in shell script?

727