3.3. Command SubstitutionIn almost all cases in this document, I use the $(<command>) convention for command substitution: that is,
means "substitute the output from the date +%H%M command here." This works in Bash 2.0+. In some older versions of Bash, prior to 1.14.7, you may need to use backquotes (`date +%H%M`). Backquotes can be used in Bash 2.0+, but are being phased out in favor of $(), which nests better. If you're using an earlier version of Bash, you can usually substitute backquotes where you see $(). If the command substitution is escaped (ie. \$(command) ), then use backslashes to escape BOTH your backquotes (ie. \'command\' ). Linux HOWTO full list |
|
This document, LDP HOWTO-INDEX, is copyrighted (c) 1995 - 2002 by Tim Bynum, Guylhem Aznar, Joshua Drake and Greg Ferguson. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html. If you have questions, please contact the LDP.
Web Design Copyright © 1999-2003. Chrisranjana Software Solutions Pvt Ltd. syndicate rss feed |