Como criar um script de bash
#!/bin/bash
echo "Hello, world!"
Cooperative Cassowary
#!/bin/bash
echo "Hello, world!"
Let us understand the steps in creating a Shell Script:
1. Create a file using a vi editor(or any other editor). Name script file with extension . sh.
2. Start the script with #! /bin/sh.
3. Write some code.
4. Save the script file as filename.sh.
5. For executing the script type bash filename.sh.
echo '#!bin/bash' > filename
# works with and without extention, if you want extention do filename.sh
chmod +x filename