How to create a Shell Script & execute it in Linux/Unix?
How to create a Shell Script & execute it in Linux/Unix?
how to run shell script in linux | how to create a shell script in linux | execute unix command in shell script | shell scripting programs in linux with examples | linux script command | how to run sh file in linux command line | advanced shell script examples | bash script to create a file
how to run shell script in linux | how to create a shell script in linux | execute unix command in shell script | shell scripting programs in linux with examples | linux script command | how to run sh file in linux command line | advanced shell script examples | bash script to create a file
how to run shell script in linux | how to create a shell script in linux | execute unix command in shell script | shell scripting programs in linux with examples | linux script command | how to run sh file in linux command line | advanced shell script examples | bash script to create a file
how to run shell script in linux | how to create a shell script in linux | execute unix command in shell script | shell scripting programs in linux with examples | linux script command | how to run sh file in linux command line | advanced shell script examples | bash script to create a file
how to run shell script in linux | how to create a shell script in linux | execute unix command in shell script | shell scripting programs in linux with examples | linux script command | how to run sh file in linux command line | advanced shell script examples | bash script to create a file
how to run shell script in linux | how to create a shell script in linux | execute unix command in shell script | shell scripting programs in linux with examples | linux script command | how to run sh file in linux command line | advanced shell script examples | bash script to create a file how to run shell script in linux how to create a shell script in linux execute unix command in shell script shell scripting programs in linux with examples linux script command how to run sh file in linux command line advanced shell script examples bash script to create a file
Share
{1} Open a text editor you want to write the script. It can be a command-line editor like vi.
{2} Add the following lines:
#!/bin/bash
echo "Hi Aviance user!"
{3} Save the file in the your workplace as “welcome.sh”.
{4} Move from the text editor to a command shell.
{5} From the command shell, type this to terminal:
$ chmod +x welcome.sh
{6} To execute the script, type this to terminal:
$ ./welcome.sh
OUTPUT: Hi Aviance user!