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

What does echo $0 do?

0 Answers  


Script S1 (which copies .dat files from one directory1 to another directory2) run continuously. Write Script S2 which kills S1 first, compresses all .dat files in directory1 and directory2 successfully, re-run Script S1 and stops self i.e. S2.

2 Answers   IBM, TCS,


What are filters explain sort with all the options available?

0 Answers  


What is Linux language details

0 Answers   Quick Heal,


Explain about login shell?

0 Answers  






How to create environment variables?What are the conditions for creating variables?

1 Answers   Infosys, Wipro,


How do I run a .sh file on mac?

0 Answers  


I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?

0 Answers  


How to customise the other shell?

2 Answers   Quest,


What is a batch file used for?

0 Answers  


How do I start a shell script?

0 Answers  


How to replace following lines, catch (DAOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } catch (BOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw e; } catch (Exception e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } Needs to be changed in to, catch (DAOException e) { AppException.handleException (null, null, e, null, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); } catch (BOException e) { AppException.handleException (null, null, null, e, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 0); } catch (Exception e) { AppException.handleException (null, null, null, null, null, e, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); }

0 Answers   Wipro,


Categories