how can you execute the shell scripts?

Answers were Sorted based on User's Feedback



how can you execute the shell scripts?..

Answer / chandru

If the path variable does not contain ur current
directory,then you can execute the script by giving
$./scriptname
If you include your current directory in path variable then
$scriptname

or
If u want to invoke new shell
$ ksh scriptname

Is This Answer Correct ?    3 Yes 1 No

how can you execute the shell scripts?..

Answer / manhar chavan

sh File_Name.sh
then press enter

Is This Answer Correct ?    2 Yes 0 No

how can you execute the shell scripts?..

Answer / pschavan

Script with extension ".sh" or ".ksh" can be excecuted on
command line.

e.g abc.sh or abc.ksh

Is This Answer Correct ?    3 Yes 4 No

how can you execute the shell scripts?..

Answer / green gene

Step 1. Include an #!<full path to an interpreter>
Step 2. chmod {u,g,o,a}+x <filename>
Step 3. offer blindfold
Step 4. offer last cigarette
Step 5. execute.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Shell Script Interview Questions

How do I open the shell in cmd?

0 Answers  


How to declare functions in unix shell script?

4 Answers  


determine the output of the following command: echo ${new:-variable}

0 Answers  


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.

2 Answers  


How do you debug a script?

0 Answers  






What's the difference between scripting and coding?

0 Answers  


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

4 Answers  


Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.

0 Answers  


How can I set the default rwx permission to all users on every file which is created in the current shell?

0 Answers  


How do I run a shell script in powershell?

0 Answers  


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.

0 Answers  


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

0 Answers  


Categories