Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

echo to file

echo "I am "Finding" difficult to write this to file" > file.txt
echo "I can "write" without double quotes" >> file.txt

echo "This is a test to write $PATH in my file" >> file.txt
echo 'This is a test to write '"$PATH"' in my file' >> file.txt

tee -a file.txt <<EOF

I am "Finding" difficult to write this to file
I can "write" without double quotes
EOF
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #echo #file
ADD COMMENT
Topic
Name
4+7 =