[ Main ] [ Home ] [ Work ] [ Code ] [ Rants ] [ Readings ] [ Links ] |
[2024] [2023] [2022] [2021] [2020] [2019] [2018] [2017] [2016] [2015] [2014] December November October September August July June May April March February January [2013] [2012] [2011] [2010] [2009] [2008] [2007] [2006] [2005] [2004] [2003] |
[Fri Feb 7 17:06:46 CST 2014]While working on a scripting project at work using the Bash shell, I ran into an interesting issue that I hadn't noticed before. As it turns out, it's a bad idea to use dashes in the names of variables when doing shell scripting. Notice this: {link to this entry}$ cat myscript #!/bin/bash DATE-NOW=`date` echo $DATE-NOW $ ./myscript ./myscript: line 3: DATE-NOW=Fri: command not found -NOW $ cat myscript #!/bin/bash DATE_NOW=`date` echo $DATE_NOW $ ./myscript Fri Feb 7 17:11:18 CST 2014 [Fri Feb 7 11:36:17 CST 2014]Today, while viewing posts by other people on Google Plus, I came across the following nice graph that shows the timeline of the Debian project. It's a bit outdated and it contains a small error (the codename for Debian 7.0 is "Wheezy", and not "Wheeze"), but it's quite nice anyways: {link to this entry} |