Linux Shell Scripting Tutorial
Introduction Tools required for shell scripting First shell script Interacting with user Operators Special characters in BASH scripting Variables in Linux BASH scripting Arrays Integer operations floating point operations String manipulation in shell scripting Parameter substitution Command Substitution Conditional statements Looping statements Passing parameters exit status of the script Functions Sourcing filesFirst example in linux shell scripting
You should remember below things while writing the scripts.- Every script should being with “#!/bin/bash”
- Comments can be added by prefixing the line with #
#!/bin/bash
x=10
echo $x
Before you execute above command, ensure that you modify the permission of the file sample1.sh so that you can execute it.
chmod +x sample1.sh
To execute this program, just go to the shell prompt and type ./sample1.sh This should generate below output.10
Web development and Automation testing
solutions delivered!!