2
votes
5answers
3k views

Extract date from a variable in a different format

Let me explain you the problem $ date +%c -d "$d" Tue 31 Dec 2013 01:13:06 PM CET $ date +'Today is %F' -d "$d" Today is 2013-12-31 This solution corresponds to current date. But I have one ...
0
votes
0answers
15 views

UNIX: How to extract date from a variable storing a UNIX DATE [duplicate]

I am facing following issue: Input: F=`date +%Y%m%d` echo $F Output: F=20131231 But when trying this(File Name:A.sh): C=`date` G=`$C +%Y%m%d` echo $C echo $G Output: A.sh[6]: Tue: not ...
0
votes
2answers
137 views

Transform list of files (with date) into list of dates

I have a directory where I store backups. The are in the format Complete Backup YYYY-MM-DD hh-mm-ss.tar.bz2 I have found out that you can feed a date into the date command using date --date="YY-MM-DD ...
2
votes
1answer
753 views

Need help converting a string from a file into a date

I'm trying to read a string from a file and then convert it into a date but for some reason it's failing. I'm actually modifying a GeekTool Geeklet that's not working at the moment. It reads a file ...