| | |
Problem printing date
Please support our Shell Scripting advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Nov 2009
Posts: 35
Reputation:
Solved Threads: 0
I have declared a variable:
and I am trying to use sed to replace the word "in" with "out:date:name" but don't know the correct syntax to make $today print correctly. I have tried quotes and double quotes and brackets but to no avail. When I do it like this, $name prints correctly, but $today prints literally "$today"
today=$(date +%m/%d/%Y) and I am trying to use sed to replace the word "in" with "out:date:name" but don't know the correct syntax to make $today print correctly. I have tried quotes and double quotes and brackets but to no avail. When I do it like this, $name prints correctly, but $today prints literally "$today"
sed 's/\<in\>/out:'$today':'$name'/' ![]() |
Similar Threads
- Problem with printing(showing) output in Java (Java)
- Problem with insert Date and Time in graphics (C++)
- problem in printing in VB (Visual Basic 4 / 5 / 6)
- date problem (Visual Basic 4 / 5 / 6)
- how to display a certain date record in data report from the datagrid (Visual Basic 4 / 5 / 6)
- Time zone problem (PHP)
- Dreamweaver MX2004 & date problem, etc. (Graphics and Multimedia)
- Printing problem with Qbasic (Legacy and Other Languages)
- Problem printing from IE6 (Web Browsers)
Other Threads in the Shell Scripting Forum
- Previous Thread: reading input problem.
- Next Thread: Need SFTP script
| Thread Tools | Search this Thread |





