< Day Day Up > |
Metacharacters are special characters used to represent something other than themselves . Table 11.6 lists some common Korn shell metacharacters and their functions. Table 11.6. Korn Shell Metacharacters
Example 11.26.1 $ ls -d * all files are displayed abc abc122 abc2 file1.bak file2.bak nonsense nothing one abc1 abc123 file1 file2 none noone 2 $ print hello \ # The carriage return is escaped > there hello there 3 $ rusers& # Process the rusers command in the background [1] 4334 $ 4 $ who; date; uptime # Commands are executed one at a time ellie console Feb 10 10:46 ellie ttyp0 Feb 15 12:41 ellie ttyp1 Feb 10 10:47 ellie ttyp2 Feb 5 10:53 Mon Feb 15 17:16:43 PST 2004 5:16pm up 5 days, 6:32, 1 user, load average: 0.28, 0.23, 0.01 5 $ print $HOME # The value of the HOME variable is printed /home/jody/ellie 6 $ print $LOGNAME # The value of the LOGNAME variable is printed ellie 7 $ ( pwd; cd / ; pwd ) /home/jody/ellie / $ pwd /home/jody/ellie 8 $ { pwd; cd /; pwd; } /home/jody/ellie / $ pwd / 9 $ ( date; pwd; ls ) > outfile $ cat outfile Mon Feb 15 15:56:34 PDT 2004 /home/jody/ellie foo1 foo2 foo3 EXPLANATION
|
< Day Day Up > |