GNU bug report logs - #26491
date and echo using with underscore

Previous Next

Package: coreutils;

Reported by: Edmond Yuen <lordedmond <at> gmail.com>

Date: Fri, 14 Apr 2017 06:41:02 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Edmond Yuen <lordedmond <at> gmail.com>
To: 26491 <at> debbugs.gnu.org
Subject: bug#26491: date and echo using with underscore
Date: Fri, 14 Apr 2017 14:36:49 +0800
[Message part 1 (text/plain, inline)]
Please verify the script below:

#/bin/bash

D=`date +%Y%m%d`
i="someparameter"

echo $D_$i
echo $D\_$i
echo $D
echo $i
echo _




//   my system is debian with coreutils 8.26-3
//
//   db=`date -d "-1day" +%Y%m%d`
//   i="0"
This is the result from my system

~$ echo "$db_$i"
0
~$ echo "$db\_$i"
20170413\_0
~$ echo "$db$i"
201704130

Thank you!
[Message part 2 (text/html, inline)]

This bug report was last modified 8 years and 123 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.