…I want to take a couple minutes to talk about DATE and PRINTF.…DATE is not part of Bash but it's really useful for certain kinds of scripts.…The DATE command gives you a format like…this, and you can use a string formatting option,…the character + followed by a format specifier in…quotes, to get pretty much any format you need.…Here I've used %d-%m-%Y.…And that gives me the day, the month, and the year.…Here's another one.…Percent capital H, dash percent capital M, dash percent capital S,…and that's the hours, minutes, and seconds of the current time.…

You can explore all of the other format specifiers…on dates manpage, and it's a couple pages down.…As you can see, there's a whole bunch of things that you can use.…And I encourage you to explore those.…I'll hit Q to quit out of here.…Another handy tool is print f, a built in that comes…with Bash, which lets you print out data with a particular format.…While you can use echo to lay out…text manually, printf gives you a lot more options.…Let's take a look at some of them.…

Resume Transcript Auto-Scroll

Author

Released

11/26/2013

Bash, or the Bourne Again Shell, is a widely popular command-line interpreter for administration and programming tasks. It's also the default option on Mac OS X and Linux. But Bash is different than most scripting languages. That's why Scott Simpson spends some time in this course running you through the syntax—introducing variables, numbers, and control structures—so you can start writing scripts right away. He shows you how to wrap up multiline operations in one file, implement flow control, and interact with users to get input. Plus, he offers challenges along the way that allow you to put what you've learned to the test.