how can you execute the shell scripts?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
How do I open the shell in cmd?
How to declare functions in unix shell script?
determine the output of the following command: echo ${new:-variable}
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.
How do you debug a script?
What's the difference between scripting and coding?
How do you read arguments in a shell program - $1, $2 ..?
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.
How can I set the default rwx permission to all users on every file which is created in the current shell?
How do I run a shell script in powershell?
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.
What is the command to find out today's date?