User Tools

Site Tools


tsm:tsm_script_trick

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tsm:tsm_script_trick [2021/01/26 21:12]
manu created
tsm:tsm_script_trick [2021/01/26 21:14] (current)
manu [How to use variables into scripts]
Line 20: Line 20:
    
 **Tricks for dates:** **Tricks for dates:**
 +<​code>​
 jour -X --> date Linux  (into AIX RPM package coreutils, or linux native date) jour -X --> date Linux  (into AIX RPM package coreutils, or linux native date)
 expired=1 expired=1
 YESTERDAY=$(/​opt/​freeware/​bin/​date +%Y-%m-%d -d "​$expired day ago") YESTERDAY=$(/​opt/​freeware/​bin/​date +%Y-%m-%d -d "​$expired day ago")
 TODAY=$(/​opt/​freeware/​bin/​date +%Y-%m-%d) TODAY=$(/​opt/​freeware/​bin/​date +%Y-%m-%d)
 +</​code>​
  
 In TSM select yesterday is : current_timestamp-24 hours In TSM select yesterday is : current_timestamp-24 hours
Line 48: Line 50:
 </​cli>​ </​cli>​
  
-FIXME Never use UNIX OS predefined variables as scripts variables --> I use date1, not date (which is a UNIX command!)+FIXME Never use UNIX OS commands nor predefined variables as scripts variables --> I use date1, not date (which is a UNIX command!)
tsm/tsm_script_trick.1611691966.txt.gz · Last modified: 2021/01/26 21:12 by manu