Introducing UNIX and Linux |
Advanced shell programmingOverview |
Answer to chapter 9 question 1This is a straightforward function, just requiring two commands between the braces. thisyear() { printf "This year is " date "+%Y" } Alternatively, this could be done using thisyear() { echo "This year is $( date +%Y )" } Note that the argument to |
Copyright © 2002 Mike Joy, Stephen Jarvis and Michael Luck