0

Hello all.

New here. Another student looking for a little help. Technically I wouldn't consider this a homework question, as it is part of a much larger project for my class. My professor is little help so I'm here now. I hope you can help.

I have a text file, and I need to print today's date at the end of the last line and in MM/DD/YYYY format.

What is in bold is what I have trouble with.

4
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by sknake
0

date +%m/%d/%Y will give you the proper format, but i'm not sure how you would append it to the last line.

0

Hello all.

New here. Another student looking for a little help. Technically I wouldn't consider this a homework question, as it is part of a much larger project for my class. My professor is little help so I'm here now. I hope you can help.

I have a text file, and I need to print today's date at the end of the last line and in MM/DD/YYYY format.

What is in bold is what I have trouble with.

I think it depends on the circumstances, but an easy way is:

echo \ date >> file

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.