Why we are writting shell scripts?
Plz if possible explain it briefly.
Answers were Sorted based on User's Feedback
1>Interactive mood:--
As Shell scripting is working like as interpreter (not
likely compiler) in a interactive mood.
2> Less time:--
it will take less time than C or C++ or other file to process.
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / ashok
Shell is a command interpeter. If we want to run multiple
commands at a time through a script file then it is called
shell scripts.
Generally we will write these to set certain environmental
variables in unix and run some other programs.
The shell scripts utility programs to perform certain tasks
in unix environment.
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / praveen tiwari
Shell script allows the user to perform his day-to-day
tasks sooner.Even a Shell Environment doesnt need a
graphical environment to write a script. So what happens is
it will be more easy for programmer to write shell scripts
on Command line environment , where it doesnt costs more
resources comparable to Graphical environment.
For example : Backup Scripts , Keeping Log files of system.
shell scripts makes you the task easier !!
And to automate the script in Linux we perform cron tasks.
Once cron has to be set. It performs operations automatically
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / jrgalaura
Another one would be to automate routinary/housekeeping
tasks especially those long commands we keep on typing
everyday or weekly - we could write all those series of
commands in a script and just run that script anytime we
need it instead of writing all those hard to memorize
commands all the time.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / nagireddyunix
Shell is command line interpreter, in shell script we can
write multiple commands to do particular task by executing
the shell script.
shell is used to set our environment.
| Is This Answer Correct ? | 1 Yes | 2 No |
what is the difference between cmp and diff commands
What is Linux language details
Why are shell scripts used?
Create a bash shell script that removes all files whose names end with a "~" from your home directory and subdirectories. Name this script "cleanup.sh"
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); }
What is the significance of the shebang line in shell scripting?
Is shell a scripting language?
What does sh mean?
How can I send a mail with a compressed file as an attachment?
How to print all the arguments provided to the script?
In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?
How to find all the files modified in less than 3 days and save the record in a text file?