Problem with my bash script
I have a script in which some html code is created with information about my system. What I would like is to have the html code automatically written to a file.
Here is the script Code:
#!/bin/bash I can do what I want outside of the script: make_page > page.html I just can't do it within the script. |
If you're trying to have your script write this to a file "page.html" rather than having to re-direct the output of the script. Try the following.
Code:
cat <<- _EOF_ With.... Code:
echo " |
hmmm ... that would seem to be an odd approach kinneyd when a here document is all about redirection and capturing what you want :)
@OP it generally helps if you tell us 'what' did not work about your attempts as it may be something simple :) Here are 2 options you could use (I will only show additional code): Option 1: Code:
create_page() Code:
create_page() |
All times are GMT -5. The time now is 05:31 PM. |