wiki:expansion

# Differences

This shows you the differences between two versions of the page.

 — wiki:expansion [2016/08/02 14:47] (current) 2015/11/16 12:45 asa created 2015/11/16 12:45 asa created Line 1: Line 1: + ====== Command line expansion ===== + + When you type a command the shell does a few things before executing the command. ​ Before we get to that we need a new command, called ''​echo''​ which simply prints its output to standard output: + + + $echo this is a test + this is a test + ​ + + Now here's an interesting example that might get you scratching your heads: + +$ echo * + copy_of_file.txt my_file.txt my_file2.txt subdirectory + ​ + + To understand what happened here, recall that ''​*''​ is a wildcard that will match any character, and so before applying the echo command, the wildcard was expanded to match any file name in your current directory. +