Showing posts with label write. Show all posts
Showing posts with label write. Show all posts
Sunday, January 19, 2014
simple way to write to files from bash script
Here is two of the simplest method from where you can write to files from a bash script.
Method One
Within the bash script write
Method Two
Within the bash script write
Read more »
Method One
Within the bash script write
echo "what you want to write" > filePath/fileName
echo "What you want to append" >> filePath/fileName
Method Two
Within the bash script write
cat << EOF > filePath/fileName
Lines of the text that you want to write.
You can write any number of lines.
EOF
cat << EOF > filePath/fileName
Lines of the text that you want to append.
You can write any number of lines.
EOF
Subscribe to:
Posts (Atom)