Operating System - HP-UX
1819870 Members
2507 Online
109607 Solutions
New Discussion

sccs identification keywords

 
SOLVED
Go to solution
Mark A. Carlson
Occasional Contributor

sccs identification keywords

We have a script to put into sccs. One of the lines of the script is: TS=`date "%Y%m%d"` The problem is sccs is ready %Y% as an ident keyword. How can I get sccs to not touch the command when I put the shell script into sccs?
1 REPLY 1
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: sccs identification keywords

Well, %Y% is certainly one of the values that SCCS's get command recogizes. My only suggestion is to outbushwhack it via this subterfuge:

TS=`date "+%Y%m%d"`
becomes:
typeset F1="%Y"
typeset F2="%m" # eventhough these are not 'get' tokens
typeset F3="%d" # nor these

TS=$(date "+${F1}${F2}${F3}")

I intentionally "improved" your deprecated backticks syntax.
If it ain't broke, I can fix that.