
See Our team
Wondering how we keep quality?
Got unsolved questions? Ask Questions
GATE
GMAT
CBSE
NCERT
Career
Interview
Railway
UPSC
NID
NIFT-UG
NIFT-PG
PHP
AJAX
JavaScript
Node Js
Shell Script
Research
How long does a variable in a shell script last?
How long does a variable in a shell script last?
Shell programming or shell scripting consists of most of the features that modern programming languages have to offer. Any script, simple to complex, can be developed using Shell scripting. It is a series of UNIX commands written to accomplish a particular task using a plain text file. Tasks of day-to-day life can be automated with the help of shell scripting.
If you are new to the concepts of Unix, shell, and Perl, read it here. If you have knowledge about shell scripting and have to face a related job interview, then this shell scripting interview questions and answer article will help you with the top shell scripting interview questions that can make your preparation easy.
#!/bin/bash # if we don't have a file, start at zero if [ ! -f "/tmp/value.dat" ] ; then value=0 # otherwise read the value from the file else value=`cat /tmp/value.dat` fi # increment the value value=$((value + 1)) # show it to the user echo "value: ${value}" # and save it for next time echo "${value}" > /tmp/value.dat
We made eduladder by keeping the ideology of building a supermarket of all the educational material available under one roof. We are doing it with the help of individual contributors like you, interns and employees. So the resources you are looking for can be easily available and accessible also with the freedom of remix reuse and reshare our content under the terms of creative commons license with attribution required close.
You can also contribute to our vision of "Helping student to pass any exams" with these. Answer a question: You can answer the questions not yet answered in eduladder.How to answer a question Career: Work or do your internship with us.Work with us Create a video: You can teach anything and everything each video should be less than five minutes should cover the idea less than five min.How to upload a video on eduladder