sample session about “alias expansion” in Bash

$ls -l 1
ls: cannot access '1': No such file or directory
$cat >> 1
hello
$ls -l 1
-rw-r--r-- 1 jeffrin jeffrin 6 Mar 20 23:38 1
$cat 1
hello
$alias appendinput="cat >>"
$appendinput 
bash: syntax error near unexpected token `newline'
$appendinput app
added
$cat app 
added
$

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s