bash echo 1

bash echo

# echo script vars
echo "outputString"
varToPrint=10
echo $varToPrint

# echo files
echo * # all
echo *.png # all pngs
echo specificFile.txt

Here is what the above code is Doing:
1. echo “outputString”
– prints “outputString”
2. varToPrint=10
– creates a variable called varToPrint and sets it to 10
3. echo $varToPrint
– prints the value of varToPrint
4. echo *
– prints all files in the current directory
5. echo *.png
– prints all files in the current directory that end in .png
6. echo specificFile.txt
– prints specificFile.txt

Similar Posts