Input and Output
Reading from files
#!/bin/bash
while read line; do
echo $line
done < input.txt
Writing to files
#!/bin/bash
echo "This is the text file!" > output.txt
Appending to files
#!/bin/bash
echo "This will be appended" >> output.txt
#!/bin/bash
while read line; do
echo $line
done < input.txt
#!/bin/bash
echo "This is the text file!" > output.txt
#!/bin/bash
echo "This will be appended" >> output.txt