date command is giving erroneous output while using inside rpm spec file
问题 I have to perform some necessary steps before installing my package, such as taking back up of previous datastore snapshot. For that purpose I'm using a %pre script as follows. %pre #!/bin/sh -------- -------- stamp=`date +%Y%m%d%H%M%S` echo ${stamp} ------------- ------------- The output is as follows: 20161103123325OURCE It is printing some random characters along with date. "OURCE" is not present anywhere in my spec file. The same script works perfectly as standalone. The platform is