Variable or something else?
Hi all,
i have a question. From command #date +%F it shows me the date in right format (2008-10-30) but when i issue the command #touch 'date +%F'.log it doesn't name the file in right name format which i expected (2008-10-30.log). The other guy can do on his box so i think the problem is my side. What should i do in this situation? |
Well, if we knew who "the other guy" was, we might be able to see what he was doing......;)
Seriously, is it possible that you used single quotes, when you needed to use backtics? To run a command and use its output inside another command, you need one of two forms: command2 $(command1) OR command2 `command1` In the second example, those are backtics (on a standard US Qwerty keyboard, top left--just above the tab key) |
Got it. You're the man. Thanks a lot.
|
All times are GMT -5. The time now is 11:52 AM. |