Command Line Date Time Not Working in Debian Linux

User discussion and information resource forum for scripting of TeraByte products using script lanugages such as TBScript, VBScript, Batch Files, and more.

Command Line Date Time Not Working in Debian Linux

Postby brianlewis » Sat Feb 23, 2013 9:38 am

Running Debian Linux 2.6.32-5-686

Command Line Used : /imagel/imagel --b --d:0 --f:/mnt/backup/"Backup-Apollo-$~YYYY$-$~MM$-$~DD$-$~HHMM$" --con -u

This should make a file like Backup-Apollo-2013-02-23-1010.tbi, but instead makes a file backup/Backup-Apollo-2013~MM23~HHMM$.tbi

Notice the YEAR and DAY works, but the Month, Hour and Minute do not.

Any idea on why IMAGEL is not processing the Month Hour and Minute fields correctly under Linux? It does work if I just run ImageL and use the CGUI to go with default backup settings and backup name, but it will not work when feeding it this name from the command line. I've tried with and without " quotes and get different results.

Command Line Used : /imagel/imagel --b --d:0 --f:/mnt/backup/Backup-Apollo-$~YYYY$-$~MM$-$~DD$-$~HHMM$ --con -u
gets me Backup-Apollo-$~YYYYhimBH$~MMhimBH$~DDhimBH0834.tbi , so the HHMM is working but now the $- was converted into himBH

I must be missing some important quote " ' abbreviating that is necessary
brianlewis
 
Posts: 1
Joined: Sat Feb 23, 2013 9:22 am

Re: Command Line Date Time Not Working in Debian Linux

Postby TeraByte Support(TP) » Sat Feb 23, 2013 12:37 pm

From the command line (or from a script), it should work if you escape all the "$" with a backward slash, as shown in the example below:

./imagel --b --d:l1@0x4 --f:"/mnt/images/Backup-l1-0x4-\$~YYYY\$-\$~MM\$-\$~DD\$-\$~HHMM\$"

In other words, for each $ put a \ in front of it, giving you => \$
Tom Pfeifer
TeraByte Support
TeraByte Support(TP)
 
Posts: 305
Joined: Wed Aug 31, 2011 9:22 am


Return to Scripting

cron