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 |
What does echo $0 do?
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.
What are filters explain sort with all the options available?
What is Linux language details
Explain about login shell?
How to create environment variables?What are the conditions for creating variables?
How do I run a .sh file on mac?
I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?
How to customise the other shell?
What is a batch file used for?
How do I start a shell script?
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); }